mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-25 18:03:50 +00:00
WebSockets: don't assert that server is connected upon initialization (#4932)
there may already have been a disconnect, which is still in the processing queue. fix #4931
This commit is contained in:
parent
1c93a93696
commit
6398dc308a
@ -86,7 +86,6 @@ class WebsocketLayer(layer.Layer):
|
|||||||
def __init__(self, context: Context, flow: http.HTTPFlow):
|
def __init__(self, context: Context, flow: http.HTTPFlow):
|
||||||
super().__init__(context)
|
super().__init__(context)
|
||||||
self.flow = flow
|
self.flow = flow
|
||||||
assert context.server.connected
|
|
||||||
|
|
||||||
@expect(events.Start)
|
@expect(events.Start)
|
||||||
def start(self, _) -> layer.CommandGenerator[None]:
|
def start(self, _) -> layer.CommandGenerator[None]:
|
||||||
|
Loading…
Reference in New Issue
Block a user