If an error frame for a request is received shortly after it times out
and the request has not been evicted from the list of pending calls yet,
this would cause a crash because after_receive_error is being called
with one less argument than it expects. after_receive_error expects a
request and the error but it is being called with just the error. It's
actually non-trivial to pass the request here because we don't keep
track of it.
We think it's safe to simply log the error rather than trying to call
after_receive_error given that it isn't being called right now anyway.
Note that this crash is what was causing the _loop to crash previously and
stop processing messages. This should address the crash, plus this code path
will not really be exercised in the future because requests are now evicted
from the pending list when they time out (#461).
If an error frame for a request is received shortly after it times out and the request has not been evicted from the list of pending calls yet, this would cause a crash because
after_receive_error
is being called with one less argument than it expects.after_receive_error
expects a request and the error but it is being called with just the error. It's actually non-trivial to pass the request here because we don't keep track of it.We think it's safe to simply log the error rather than trying to call
after_receive_error
given that it isn't being called right now anyway.Note that this crash is what was causing the
_loop
to crash previously and stop processing messages. This should address the crash, plus this code path will not really be exercised in the future because requests are now evicted from the pending list when they time out (#461).@blampe @willhug