Close socket explicitly when tcp_error occured AND add error logs at right places
Increase the default keepalive value
Increase the default keepalive value#2
Restart a gen_server proc when some error occured
Fix to close a tcp socket properly in any cases