@@ -108,6 +108,7 @@ def _set_environment_connection_list(self, connections: []): # type: ignore
108
108
109
109
def _open_connections (self , reconnect_handlers : bool = False ) -> None :
110
110
111
+ logger .debug ("inside connection._open_connections creating connection" )
111
112
if self ._recovery_configuration .active_recovery is False :
112
113
self ._conn = BlockingConnection (
113
114
url = self ._addr ,
@@ -123,7 +124,7 @@ def _open_connections(self, reconnect_handlers: bool = False) -> None:
123
124
)
124
125
125
126
if reconnect_handlers is True :
126
-
127
+ logger . debug ( "reconnecting managements, publishers and consumers handlers" )
127
128
for i , management in enumerate (self ._managements ):
128
129
# Update the broken connection and sender in the management
129
130
self ._managements [i ]._update_connection (self ._conn )
@@ -206,10 +207,6 @@ def _win_store_to_cert(
206
207
typing_extensions .assert_never (store )
207
208
return ca_cert
208
209
209
- def _open (self ) -> None :
210
- self ._management = Management (self ._conn )
211
- self ._management .open ()
212
-
213
210
def management (self ) -> Management :
214
211
"""
215
212
Get the management interface for this connection.
@@ -329,7 +326,7 @@ def _on_disconnection(self) -> None:
329
326
330
327
except ConnectionException as e :
331
328
base_delay *= 2
332
- logger .debug (
329
+ logger .error (
333
330
"Reconnection attempt failed" ,
334
331
"attempt" ,
335
332
attempt ,
@@ -338,7 +335,7 @@ def _on_disconnection(self) -> None:
338
335
)
339
336
# maximum attempts reached without establishing a connection
340
337
if attempt == self ._recovery_configuration .MaxReconnectAttempts - 1 :
341
- logger .debug ("Not able to reconnect" )
338
+ logger .error ("Not able to reconnect" )
342
339
raise ConnectionException
343
340
else :
344
341
continue
0 commit comments