mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-26 18:18:25 +00:00
OpenConnection: add err attr, remove ok attr
This commit is contained in:
parent
a415edbb7c
commit
14a4254285
@ -92,8 +92,8 @@ class OpenConnectionReply(CommandReply):
|
||||
command: commands.OpenConnection
|
||||
reply: str
|
||||
|
||||
def __init__(self, command: commands.OpenConnection, ok: str):
|
||||
super().__init__(command, ok)
|
||||
def __init__(self, command: commands.OpenConnection, err: typing.Optional[str]):
|
||||
super().__init__(command, err)
|
||||
|
||||
|
||||
class HookReply(CommandReply):
|
||||
|
@ -82,7 +82,7 @@ class ConnectionHandler:
|
||||
)
|
||||
self.transports[command.connection] = StreamIO(reader, writer)
|
||||
command.connection.connected = True
|
||||
await self.server_event(events.OpenConnectionReply(command, "success"))
|
||||
await self.server_event(events.OpenConnectionReply(command, None))
|
||||
await self.handle_connection(command.connection)
|
||||
|
||||
async def server_event(self, event: events.Event):
|
||||
|
Loading…
Reference in New Issue
Block a user