diff options
Diffstat (limited to 'libnetdata/socket/socket.c')
-rw-r--r-- | libnetdata/socket/socket.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libnetdata/socket/socket.c b/libnetdata/socket/socket.c index fd8613030e..2f9d476662 100644 --- a/libnetdata/socket/socket.c +++ b/libnetdata/socket/socket.c @@ -1000,9 +1000,13 @@ ssize_t send_timeout(int sockfd, void *buf, size_t len, int flags, int timeout) #ifdef ENABLE_HTTPS if(ssl->conn) { - if (!ssl->flags) { + if (ssl->flags == NETDATA_SSL_HANDSHAKE_COMPLETE) { return SSL_write(ssl->conn, buf, len); } + else { + error("cannot write to SSL connection - connection is not ready."); + return -1; + } } #endif return send(sockfd, buf, len, flags); |