diff options
author | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2016-10-24 20:08:20 +0300 |
---|---|---|
committer | Evgeny Grin (Karlson2k) <k2k@narod.ru> | 2016-10-30 18:49:45 +0300 |
commit | 63abb11b52edbee5773edf6031e15408b6f722c6 (patch) | |
tree | bd9c9bd49f8320a0ea353c67f27a2513bc5d63fd /src/microhttpd/test_upgrade.c | |
parent | f8cfc4f89f7b36394a733b462badd6d8b7f21495 (diff) | |
download | libmicrohttpd-63abb11b52edbee5773edf6031e15408b6f722c6.tar.gz libmicrohttpd-63abb11b52edbee5773edf6031e15408b6f722c6.zip |
Reworked "upgraded" closure logic: resources deallocated and sockets are closed
asynchronously only in daemon's thread and only when all data was forwarded and
application signaled about upgraded closure.
Diffstat (limited to 'src/microhttpd/test_upgrade.c')
-rw-r--r-- | src/microhttpd/test_upgrade.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/microhttpd/test_upgrade.c b/src/microhttpd/test_upgrade.c index b369fd70..965ecc00 100644 --- a/src/microhttpd/test_upgrade.c +++ b/src/microhttpd/test_upgrade.c | |||
@@ -60,9 +60,8 @@ test_upgrade (int flags, | |||
60 | struct sockaddr_in sa; | 60 | struct sockaddr_in sa; |
61 | 61 | ||
62 | done = 0; | 62 | done = 0; |
63 | if (0 == (flags & MHD_USE_THREAD_PER_CONNECTION)) | 63 | |
64 | flags |= MHD_USE_SUSPEND_RESUME; | 64 | d = MHD_start_daemon (flags | MHD_USE_DEBUG | MHD_USE_SUSPEND_RESUME, |
65 | d = MHD_start_daemon (flags | MHD_USE_DEBUG, | ||
66 | 1080, | 65 | 1080, |
67 | NULL, NULL, | 66 | NULL, NULL, |
68 | &ahc_upgrade, NULL, | 67 | &ahc_upgrade, NULL, |