mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2025-01-30 23:09:44 +00:00
Merge pull request #797 from colinbendell/colinbendell-patch-1
server_conn.address might not yet be established
This commit is contained in:
commit
442f079e0b
@ -135,8 +135,8 @@ class ServerConnection(tcp.TCPClient, stateobject.StateObject):
|
||||
def get_state(self, short=False):
|
||||
d = super(ServerConnection, self).get_state(short)
|
||||
d.update(
|
||||
address={"address": self.address(),
|
||||
"use_ipv6": self.address.use_ipv6},
|
||||
address=({"address": self.address(),
|
||||
"use_ipv6": self.address.use_ipv6} if self.address else {}),
|
||||
source_address=({"address": self.source_address(),
|
||||
"use_ipv6": self.source_address.use_ipv6} if self.source_address else None),
|
||||
cert=self.cert.to_pem() if self.cert else None
|
||||
|
Loading…
Reference in New Issue
Block a user