Skip to content

Don't crash logger when transport is None#889

Merged
asvetlov merged 1 commit intoaio-libs:masterfrom
elastic-coders:fix_log_exception_20160527
May 29, 2016
Merged

Don't crash logger when transport is None#889
asvetlov merged 1 commit intoaio-libs:masterfrom
elastic-coders:fix_log_exception_20160527

Conversation

@mpaolini
Copy link
Copy Markdown
Contributor

When websocket client closes connection I often get this (on the server)

[...]

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/marco/src/aiohttp/aiohttp/helpers.py", line 389, in log
    [message, environ, response, transport, time]))
  File "/home/marco/src/aiohttp/aiohttp/helpers.py", line 376, in _format_line
    return tuple(m(args) for m in self._methods)
  File "/home/marco/src/aiohttp/aiohttp/helpers.py", line 376, in <genexpr>
    return tuple(m(args) for m in self._methods)
  File "/home/marco/src/aiohttp/aiohttp/helpers.py", line 333, in _format_a
    return args[3].get_extra_info('peername')[0]
AttributeError: 'NoneType' object has no attribute 'get_extra_info'

Could not cook a test, let me know if you need it

@asvetlov asvetlov merged commit 782b4fb into aio-libs:master May 29, 2016
@asvetlov
Copy link
Copy Markdown
Member

I can live without a test for this particular case.

@asvetlov
Copy link
Copy Markdown
Member

Thanks

@lock
Copy link
Copy Markdown

lock bot commented Oct 29, 2019

This thread has been automatically locked since there has not been
any recent activity after it was closed. Please open a new issue for
related bugs.

If you feel like there's important points made in this discussion,
please include those exceprts into that new issue.

@lock lock bot added the outdated label Oct 29, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Oct 29, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants