title: Safe close connection in Golang
body: <p>When I open a socket connection, I immediately put the socket.Close() logic in a defer function after the opening of the socket. However, what if the socket.Close() would cause another panic? Should I always nest another defer/recover inside the outer defer to prevent my program from crashing? Something like this: <a href="http://play.golang.org/p/GnEMQS-0jj">http://play.golang.org/p/GnEMQS-0jj</a></p>
  
  <p>Thanks,
  Elgs </p>