mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-27 02:24:18 +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
|
command: commands.OpenConnection
|
||||||
reply: str
|
reply: str
|
||||||
|
|
||||||
def __init__(self, command: commands.OpenConnection, ok: str):
|
def __init__(self, command: commands.OpenConnection, err: typing.Optional[str]):
|
||||||
super().__init__(command, ok)
|
super().__init__(command, err)
|
||||||
|
|
||||||
|
|
||||||
class HookReply(CommandReply):
|
class HookReply(CommandReply):
|
||||||
|
@ -82,7 +82,7 @@ class ConnectionHandler:
|
|||||||
)
|
)
|
||||||
self.transports[command.connection] = StreamIO(reader, writer)
|
self.transports[command.connection] = StreamIO(reader, writer)
|
||||||
command.connection.connected = True
|
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)
|
await self.handle_connection(command.connection)
|
||||||
|
|
||||||
async def server_event(self, event: events.Event):
|
async def server_event(self, event: events.Event):
|
||||||
|
Loading…
Reference in New Issue
Block a user