better reconnect logic
remove debug..