Fix bug where the TcpListener would be set to null while attempting to grab a socket.