archive
/
tcp-nat-proxy
Archived
1
Fork 0

Show exception

This commit is contained in:
Jake Howard 2019-01-01 20:40:33 +00:00
parent df3a3c927e
commit 51de6bbc04
Signed by: jake
GPG Key ID: 57AFB45680EDD477
1 changed files with 4 additions and 2 deletions

View File

@ -38,8 +38,10 @@ async def handle_client(route, local_reader, local_writer):
await asyncio.gather(
pipe(local_reader, remote_writer), pipe(remote_reader, local_writer)
)
except (ConnectionRefusedError, OSError):
logger.debug("Connection to {} refused".format(destination_host_display(route)))
except (ConnectionRefusedError, OSError) as e:
logger.warning(
"Connection to {} refused: {}".format(destination_host_display(route), e)
)
pass
finally:
local_writer.close()