diff options
Diffstat (limited to 'demos/guide/quic-client-non-block.c')
-rw-r--r-- | demos/guide/quic-client-non-block.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/demos/guide/quic-client-non-block.c b/demos/guide/quic-client-non-block.c index e1735c0..61d339c 100644 --- a/demos/guide/quic-client-non-block.c +++ b/demos/guide/quic-client-non-block.c @@ -90,10 +90,12 @@ static BIO *create_socket_bio(const char *hostname, const char *port, if (sock == -1) return NULL; - /* Create a BIO to wrap the socket*/ + /* Create a BIO to wrap the socket */ bio = BIO_new(BIO_s_datagram()); - if (bio == NULL) + if (bio == NULL) { BIO_closesocket(sock); + return NULL; + } /* * Associate the newly created BIO with the underlying socket. By |