Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
mhils committed Jan 4, 2024
1 parent 770443e commit a9b8a00
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Expand Up @@ -7,6 +7,8 @@

## Unreleased: mitmproxy next

* Fix a bug where a traceback is shown during shutdown.
([#6581](https://github.com/mitmproxy/mitmproxy/pull/6581), @mhils)


## 04 January 2024: mitmproxy 10.2.0
Expand Down
5 changes: 4 additions & 1 deletion mitmproxy/proxy/mode_servers.py
Expand Up @@ -234,7 +234,10 @@ def listen_addrs(self) -> tuple[Address, ...]:
if isinstance(s, mitmproxy_rs.UdpServer):
addrs.append(s.getsockname())
else:
addrs.extend(sock.getsockname() for sock in s.sockets)
try:
addrs.extend(sock.getsockname() for sock in s.sockets)
except OSError: # pragma: no cover
pass # this can fail during shutdown, see https://github.com/mitmproxy/mitmproxy/issues/6529
return tuple(addrs)

async def _start(self) -> None:
Expand Down

0 comments on commit a9b8a00

Please sign in to comment.