Skip to content

Convert recv errors as warnings and not exceptions #787

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 24, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Convert recv errors as warnings and not exceptions
  • Loading branch information
abhinavsingh committed Nov 24, 2021
commit 7b93a75ec25ab1ac3916344de6e656a6c868014c
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