diff options
author | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2020-12-03 19:51:02 +0300 |
---|---|---|
committer | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2020-12-03 19:51:02 +0300 |
commit | b9e0a0ac45e195288dc1da99a8a68574d6255c03 (patch) | |
tree | 940ca23e969c28ea3f4d2372b184236b81cab636 /src/microhttpd/daemon.c | |
parent | 0e0ad2b23834a348a7b04289579ff7cbdd9c8a61 (diff) | |
download | libmicrohttpd-b9e0a0ac45e195288dc1da99a8a68574d6255c03.tar.gz libmicrohttpd-b9e0a0ac45e195288dc1da99a8a68574d6255c03.zip |
Stopped using sk_cork_on for TCP_NODELAY tracking.
Replaced sk_cork_on with tri-state sk_corked.
TCP_NODELAY is tracked on separate member.
Diffstat (limited to 'src/microhttpd/daemon.c')
-rw-r--r-- | src/microhttpd/daemon.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c index 797c5d49..a650eefe 100644 --- a/src/microhttpd/daemon.c +++ b/src/microhttpd/daemon.c | |||
@@ -2460,9 +2460,12 @@ new_connection_prepare_ (struct MHD_Daemon *daemon, | |||
2460 | errno = eno; | 2460 | errno = eno; |
2461 | return MHD_NO; | 2461 | return MHD_NO; |
2462 | } | 2462 | } |
2463 | connection->sk_cork_on = false; | ||
2464 | #if defined(MHD_TCP_CORK_NOPUSH) || defined(MHD_USE_MSG_MORE) | 2463 | #if defined(MHD_TCP_CORK_NOPUSH) || defined(MHD_USE_MSG_MORE) |
2465 | (void) external_add; /* Mute compiler warning */ | 2464 | if (! external_add) |
2465 | connection->sk_corked = _MHD_OFF; | ||
2466 | else | ||
2467 | connection->sk_corked = _MHD_UNKNOWN; | ||
2468 | |||
2466 | /* We will use TCP_CORK or TCP_NOPUSH or MSG_MORE to control | 2469 | /* We will use TCP_CORK or TCP_NOPUSH or MSG_MORE to control |
2467 | transmission, disable Nagle's algorithm (always) */ | 2470 | transmission, disable Nagle's algorithm (always) */ |
2468 | if (0 != MHD_socket_set_nodelay_ (client_socket, true)) | 2471 | if (0 != MHD_socket_set_nodelay_ (client_socket, true)) |