Handling the exception on socket connect (timeout expired)