Commit ba267a32 authored by Sergey Lyubka's avatar Sergey Lyubka

squashed warning in read_from_socket

parent f64ebbe0
......@@ -102,7 +102,6 @@ typedef SOCKET sock_t;
#include <pthread.h>
#include <stdarg.h>
#include <unistd.h>
#include <signal.h>
#include <arpa/inet.h> // For inet_pton() when NS_ENABLE_IPV6 is defined
#include <netinet/in.h>
#include <sys/socket.h>
......@@ -648,6 +647,7 @@ static void read_from_socket(struct ns_connection *conn) {
conn->flags &= ~NSF_CONNECTING;
ret = getsockopt(conn->sock, SOL_SOCKET, SO_ERROR, (char *) &ok, &len);
(void) ret;
#ifdef NS_ENABLE_SSL
if (ret == 0 && ok == 0 && conn->ssl != NULL) {
int res = SSL_connect(conn->ssl);
......@@ -856,6 +856,7 @@ struct ns_connection *ns_connect(struct ns_server *server, const char *host,
conn->sock = sock;
conn->connection_data = param;
conn->flags = NSF_CONNECTING;
conn->last_io_time = time(NULL);
#ifdef NS_ENABLE_SSL
if (use_ssl &&
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment