fixed socket reconnect issue