Merge pull request #1640 from Tronic/sockaddrfix
Fix server crash on request.server_port when bound to IPv6.
This commit is contained in:
commit
2363c0653e
|
@ -388,7 +388,7 @@ class Request(dict):
|
||||||
if forwarded_port:
|
if forwarded_port:
|
||||||
return int(forwarded_port)
|
return int(forwarded_port)
|
||||||
else:
|
else:
|
||||||
_, port = self.transport.get_extra_info("sockname")
|
port = self.transport.get_extra_info("sockname")[1]
|
||||||
return port
|
return port
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
|
Loading…
Reference in New Issue
Block a user