Fix a bug of pointer error
TCP socket need reconnect while recv() result == 0
move TCP socket reconnect from message thread to TCP thread
send heartbeat while interval arrived