You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
EngineClient: properly handle abort flag on close (#591)
StreamWorker.abort() calls Engine.remove() with abort set to True but
this flag was never actually used. The problem is that
EngineClient._close_stream() is then called and flushes any read
buffers, which can lead to unexpected read events and messing with the
user's code logic (StreamWorker is used by the Gateway and this issue
was discovered there).
With this patch, we ensure that worker.abort() actually aborts all
engine events.
Just a last note that we keep the current behavior when both abort and
timeout are set to True in Engine.remove()/EngineClient._close().
In that case, timeout=True prevails as it is Engine-induced and we
consider we can flush any read buffers (so potentially generating
a few ev_read events).
0 commit comments