Skip to content
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

Don't crash logger when transport is None #889

Merged
merged 1 commit into from
May 29, 2016

Conversation

mpaolini
Copy link
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
Member

I can live without a test for this particular case.

@asvetlov
Copy link
Member

Thanks

@lock
Copy link

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