Added socket.shoutdown()

 to ensure proper closing of sockets.