Added exception handling to server connection open