New submission from David <dsternli...@infinidat.com>:
`sock.getpeername` can fail for multiple reasons (see https://pubs.opengroup.org/onlinepubs/7908799/xns/getpeername.html) but in `asyncio.selector_events._SelectorTransport` it's try/excepted without any logging of the error: ``` if 'peername' not in self._extra: try: self._extra['peername'] = sock.getpeername() except socket.error: self._extra['peername'] = None ``` This makes it very difficult to debug. Would it be OK if I added here a log with information on the error? Thanks! ---------- components: asyncio messages: 362317 nosy: asvetlov, dsternlicht, yselivanov priority: normal severity: normal status: open title: asyncio.selector_events._SelectorTransport: Add logging when sock.getpeername() fails versions: Python 3.8 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue39700> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com