Fix error handling in bssl_shim socket object

We'd leak the socket if Connect failed in the middle. (This doesn't
especially matter. The test process would just exit anyway.)

Change-Id: I8e1f252781810b1d8ef3c41bd707dfebb0371e60
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/61665
Reviewed-by: Bob Beck <bbe@google.com>
Auto-Submit: David Benjamin <davidben@google.com>
Commit-Queue: Bob Beck <bbe@google.com>
diff --git a/ssl/test/bssl_shim.cc b/ssl/test/bssl_shim.cc
index 19b838a..508b192 100644
--- a/ssl/test/bssl_shim.cc
+++ b/ssl/test/bssl_shim.cc
@@ -123,8 +123,8 @@
             break;
           }
         }
-        closesocket(sock_);
       }
+      closesocket(sock_);
     }
 
     drain_on_close_ = false;