Skip to content

Commit

Permalink
Merge pull request #59 from ssahani/openssl
Browse files Browse the repository at this point in the history
Make tls socket non block
  • Loading branch information
ssahani authored May 10, 2024
2 parents e4538d8 + 58996c7 commit 16b5a0b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/netlog/netlog-tls.c
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,10 @@ int tls_connect(TLSManager *m, SocketAddress *address) {
cipher = SSL_get_current_cipher(ssl);
log_debug("tls_connect: Cipher Version: %s Name: %s", SSL_CIPHER_get_version(cipher), SSL_CIPHER_get_name(cipher));

r = fd_nonblock(fd, true);
if (r < 0)
return log_error_errno(errno, "Failed to set socket nonblock: %m");

m->bio = TAKE_PTR(bio);
m->ssl = TAKE_PTR(ssl);
m->ctx = ctx;
Expand Down

0 comments on commit 16b5a0b

Please sign in to comment.