Skip to content

Commit e569740

Browse files
ramelipacrob
authored andcommitted
Fix exception handling
1 parent 745458c commit e569740

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

libp2p/transport/tcp/tcp.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,13 +63,13 @@ async def serve_tcp(
6363
await trio.serve_tcp(handler, port, host=host, task_status=task_status)
6464

6565
async def handler(stream: trio.SocketStream) -> None:
66-
remote_host : str = ""
67-
remote_port : int = 0
66+
remote_host: str = ""
67+
remote_port: int = 0
6868
try:
6969
tcp_stream = TrioTCPStream(stream)
70-
remote_host,remote_port = tcp_stream.get_remote_address()
70+
remote_host, remote_port = tcp_stream.get_remote_address()
7171
await self.handler(tcp_stream)
72-
except Exception as e:
72+
except Exception:
7373
logger.debug(f"Connection from {remote_host}:{remote_port} failed.")
7474

7575
listeners = await nursery.start(

0 commit comments

Comments
 (0)