Added ability to stop server connection.