Message362595
Hi asvetlov,
Thank you for your reply.
I'm currently trying to debug a network issue, but I cannot determine the root cause of it because of lack of logs. It would be extremely helpful for my debugging if we could log the error that was raised by getpeername.
I noticed that in asyncio.proactor_events._set_socket_extra there *is* some logging of exceptions.
```
def _set_socket_extra(transport, sock):
transport._extra['socket'] = trsock.TransportSocket(sock)
try:
transport._extra['sockname'] = sock.getsockname()
except socket.error:
if transport._loop.get_debug():
logger.warning(
"getsockname() failed on %r", sock, exc_info=True)
if 'peername' not in transport._extra:
try:
transport._extra['peername'] = sock.getpeername()
except socket.error:
# UDP sockets may not have a peer name
transport._extra['peername'] = None
```
Although I see that there there's also a check `if transport._loop.get_debug()` so that it won't pollute the log. Would you like me to add that check to my patch too?
Thanks! |
|
Date |
User |
Action |
Args |
2020-02-24 15:51:51 | dsternlicht | set | recipients:
+ dsternlicht, asvetlov, yselivanov |
2020-02-24 15:51:51 | dsternlicht | set | messageid: <1582559511.06.0.526653918436.issue39700@roundup.psfhosted.org> |
2020-02-24 15:51:51 | dsternlicht | link | issue39700 messages |
2020-02-24 15:51:50 | dsternlicht | create | |
|