fix race condition

This commit is contained in:
Maximilian Hils 2021-03-15 11:38:21 +01:00
parent 6c07dba752
commit 10ee19c138
2 changed files with 2 additions and 2 deletions

View File

@ -130,6 +130,6 @@ class TCPLayer(layer.Layer):
else: else:
raise AssertionError(f"Unexpected event: {event}") raise AssertionError(f"Unexpected event: {event}")
@expect(events.DataReceived, events.ConnectionClosed) @expect(events.DataReceived, events.ConnectionClosed, TcpMessageInjected)
def done(self, _) -> layer.CommandGenerator[None]: def done(self, _) -> layer.CommandGenerator[None]:
yield from () yield from ()

View File

@ -207,7 +207,7 @@ class WebsocketLayer(layer.Layer):
else: # pragma: no cover else: # pragma: no cover
raise AssertionError(f"Unexpected WebSocket event: {ws_event}") 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]: def done(self, _) -> layer.CommandGenerator[None]:
yield from () yield from ()