onload icon indicating copy to clipboard operation
onload copied to clipboard

ci_tcp_sync_tcp_sockopts() does not sync CORK & NODELAY bits correctly

Open ol-alexandra opened this issue 2 years ago • 0 comments

In ci_tcp_sync_tcp_sockopts() I see:

  optval = 1;
  if( ts->s.s_aflags & CI_SOCK_AFLAG_CORK_BIT )
    ci_tcp_sock_ops_setsockopt(sock, &err, SOL_TCP, TCP_CORK,
                               &optval, sizeof(optval));
  if( ts->s.s_aflags & CI_SOCK_AFLAG_NODELAY_BIT )
    ci_tcp_sock_ops_setsockopt(sock, &err, SOL_TCP, TCP_NODELAY,
                               &optval, sizeof(optval));

It should be ts->s.s_aflags & CI_SOCK_AFLAG_CORK, without _BIT.

ol-alexandra avatar Sep 23 '22 10:09 ol-alexandra