From de9ebff2976e051b36ae3eae21490e120c8c4260 Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Sat, 5 Jan 2019 16:08:06 -0800 Subject: fixes #849 TCP option handling not quite right --- src/platform/posix/posix_tcpconn.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/platform/posix/posix_tcpconn.c b/src/platform/posix/posix_tcpconn.c index a10e102f..ef6ee8e3 100644 --- a/src/platform/posix/posix_tcpconn.c +++ b/src/platform/posix/posix_tcpconn.c @@ -1,7 +1,7 @@ // // Copyright 2018 Staysail Systems, Inc. // Copyright 2018 Capitar IT Group BV -// Copyright 2018 Devolutions +// Copyright 2019 Devolutions // // This software is supplied under the terms of the MIT License, a // copy of which should be located in the distribution where this @@ -537,11 +537,11 @@ nni_posix_tcp_conn_init(nni_tcp_conn **cp, nni_posix_pfd *pfd) void nni_posix_tcp_conn_start(nni_tcp_conn *c, int nodelay, int keepalive) { - // COnfigure the initial socket options. - (void) setsockopt( - c->pfd, IPPROTO_TCP, TCP_NODELAY, &nodelay, sizeof(int)); - (void) setsockopt( - c->pfd, SOL_SOCKET, SO_KEEPALIVE, &keepalive, sizeof(int)); + // Configure the initial socket options. + (void) setsockopt(nni_posix_pfd_fd(c->pfd), IPPROTO_TCP, TCP_NODELAY, + &nodelay, sizeof(int)); + (void) setsockopt(nni_posix_pfd_fd(c->pfd), SOL_SOCKET, SO_KEEPALIVE, + &keepalive, sizeof(int)); nni_posix_pfd_set_cb(c->pfd, tcp_conn_cb, c); } -- cgit v1.2.3-70-g09d2