mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-23 00:01:36 +00:00
fix race condition
This commit is contained in:
parent
6c07dba752
commit
10ee19c138
@ -130,6 +130,6 @@ class TCPLayer(layer.Layer):
|
||||
else:
|
||||
raise AssertionError(f"Unexpected event: {event}")
|
||||
|
||||
@expect(events.DataReceived, events.ConnectionClosed)
|
||||
@expect(events.DataReceived, events.ConnectionClosed, TcpMessageInjected)
|
||||
def done(self, _) -> layer.CommandGenerator[None]:
|
||||
yield from ()
|
||||
|
@ -207,7 +207,7 @@ class WebsocketLayer(layer.Layer):
|
||||
else: # pragma: no cover
|
||||
raise AssertionError(f"Unexpected WebSocket event: {ws_event}")
|
||||
|
||||
@expect(events.DataReceived, events.ConnectionClosed)
|
||||
@expect(events.DataReceived, events.ConnectionClosed, WebSocketMessageInjected)
|
||||
def done(self, _) -> layer.CommandGenerator[None]:
|
||||
yield from ()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user