Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

No, it is not possible to enable reconnection when the Python urllib connection is restored. Once the connection is lost, the urllib library will need to create a new connection. It is recommended to catch any exceptions that may be raised when the connection is lost and handle them accordingly to ensure that the program does not crash. In some cases, you may also need to implement a retry mechanism to attempt to reconnect multiple times before giving up.