Skip to content

Commit

Permalink
Merge pull request #1640 from Tronic/sockaddrfix
Browse files Browse the repository at this point in the history
Fix server crash on request.server_port when bound to IPv6.
  • Loading branch information
yunstanford authored Jul 25, 2019
2 parents 84b4112 + 7c7bedf commit 2363c06
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sanic/request.py
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ def server_port(self):
if forwarded_port:
return int(forwarded_port)
else:
_, port = self.transport.get_extra_info("sockname")
port = self.transport.get_extra_info("sockname")[1]
return port

@property
Expand Down

0 comments on commit 2363c06

Please sign in to comment.