A fix preventing the reconnection mechanism from being left in a broken ...

A fix preventing the reconnection mechanism from being left in a broken state and handling the synchronization of the reconnection handlers in a proper way.