Skip to content

Commit

Permalink
Convert recv errors as warnings and not exceptions (#787)
Browse files Browse the repository at this point in the history
  • Loading branch information
abhinavsingh authored Nov 24, 2021
1 parent 99fc17b commit 54baf62
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions proxy/http/handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,9 +286,9 @@ async def handle_readables(self, readables: Readables) -> bool:
# here to avoid flooding the logs.
logger.debug('%r' % e)
else:
logger.exception(
'Exception while receiving from %s connection %r with reason %r' %
(self.work.tag, self.work.connection, e),
logger.warning(
'Exception when receiving from %s connection#%d with reason %r' %
(self.work.tag, self.work.connection.fileno(), e),
)
return True
return False
Expand Down
6 changes: 3 additions & 3 deletions proxy/http/proxy/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -291,9 +291,9 @@ async def read_from_descriptors(self, r: Readables) -> bool:
),
)
else:
logger.exception(
'Exception while receiving from %s connection %r with reason %r' %
(self.upstream.tag, self.upstream.connection, e),
logger.warning(
'Exception while receiving from %s connection#%d with reason %r' %
(self.upstream.tag, self.upstream.connection.fileno(), e),
)
return self._close_and_release()

Expand Down

0 comments on commit 54baf62

Please sign in to comment.