Added locks for connection removal, also tried to do better reconnection again ...