Skip to content

bpo-40352: Try to reconnect socket when send message in SocketHandler.#22061

Closed
serhiy-storchaka wants to merge 1 commit into
python:mainfrom
serhiy-storchaka:sockethandler-reconnect
Closed

bpo-40352: Try to reconnect socket when send message in SocketHandler.#22061
serhiy-storchaka wants to merge 1 commit into
python:mainfrom
serhiy-storchaka:sockethandler-reconnect

Conversation

@serhiy-storchaka

@serhiy-storchaka serhiy-storchaka commented Sep 2, 2020

Copy link
Copy Markdown
Member

TODO: Tests and NEWS.

https://bugs.python.org/issue40352

Comment thread Lib/logging/handlers.py
self.sock = None # so we can call createSocket next time
if attempt:
continue
break

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IIUC, this code will retry connection once, straight away, if the handler was previously connected but an error occurs when actually sending the event. In the case where the reason for the error is that the remote has gone offline, how likely is that reconnection attempt to succeed? Isn't the remote going offline for a period the case described in the issue?

@ambv

ambv commented May 17, 2022

Copy link
Copy Markdown
Contributor

This missed the boat for inclusion in Python 3.9 which accepts security fixes only as of today.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting core review type-bug An unexpected behavior, bug, or error

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants