Address issue #57
Defensive coding against @socket.nil?