diff options
author | Christian Grothoff <christian@grothoff.org> | 2019-10-13 20:42:21 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2019-10-13 20:42:21 +0200 |
commit | 63a36813612a466c306297a5481c1e1e4f2e6164 (patch) | |
tree | 75c21ce38cf19bae11e54cd9281fb59249576412 | |
parent | eb8cc7eeff1855d3d2bad39562f45c39406c6c0e (diff) | |
download | libmicrohttpd-63a36813612a466c306297a5481c1e1e4f2e6164.tar.gz libmicrohttpd-63a36813612a466c306297a5481c1e1e4f2e6164.zip |
reorder statements so we can look at errno, might theoretically even fix #5826
-rw-r--r-- | src/microhttpd/test_upgrade_large.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/microhttpd/test_upgrade_large.c b/src/microhttpd/test_upgrade_large.c index 3a3a2f0c..9ad15578 100644 --- a/src/microhttpd/test_upgrade_large.c +++ b/src/microhttpd/test_upgrade_large.c | |||
@@ -639,15 +639,18 @@ recv_hdr (struct wr_socket *sock) | |||
639 | ret = wr_recv (sock, | 639 | ret = wr_recv (sock, |
640 | &c, | 640 | &c, |
641 | 1); | 641 | 1); |
642 | kick_select (); | ||
643 | if (0 > ret) | 642 | if (0 > ret) |
644 | { | 643 | { |
645 | if (MHD_SCKT_ERR_IS_EAGAIN_ (MHD_socket_get_error_ ())) | 644 | if (MHD_SCKT_ERR_IS_EAGAIN_ (MHD_socket_get_error_ ())) |
646 | continue; | 645 | continue; |
646 | fprintf (stderr, | ||
647 | "recv failed unexpectedly: %s\n", | ||
648 | strerror (errno)); | ||
647 | abort (); | 649 | abort (); |
648 | } | 650 | } |
649 | if (0 == ret) | 651 | if (0 == ret) |
650 | continue; | 652 | continue; |
653 | kick_select (); | ||
651 | if (c == next) | 654 | if (c == next) |
652 | { | 655 | { |
653 | i++; | 656 | i++; |