mirror of
https://github.com/cuberite/libevent.git
synced 2025-09-14 23:05:03 -04:00
deal with evbuffer_read() returning -1 on EINTR|EAGAIN; from Adam Langley
svn:r906
This commit is contained in:
parent
dfa53321e3
commit
4a13b22f00
@ -7,6 +7,7 @@ Changes in 1.4.6-stable:
|
|||||||
o Detect CLOCK_MONOTONIC at runtime for evdns; anonymous bug report
|
o Detect CLOCK_MONOTONIC at runtime for evdns; anonymous bug report
|
||||||
o Fix a bug where deleting signals with the kqueue backend would cause subsequent adds to fail
|
o Fix a bug where deleting signals with the kqueue backend would cause subsequent adds to fail
|
||||||
o Support multiple events listening on the same signal; make signals regular events that go on the same event queue; problem report by Alexander Drozdov.
|
o Support multiple events listening on the same signal; make signals regular events that go on the same event queue; problem report by Alexander Drozdov.
|
||||||
|
o Deal with evbuffer_read() returning -1 on EINTR|EAGAIN; from Adam Langley.
|
||||||
|
|
||||||
Changes in 1.4.5-stable:
|
Changes in 1.4.5-stable:
|
||||||
o Fix connection keep-alive behavior for HTTP/1.0
|
o Fix connection keep-alive behavior for HTTP/1.0
|
||||||
|
5
http.c
5
http.c
@ -926,8 +926,13 @@ evhttp_read(int fd, short what, void *arg)
|
|||||||
event_debug(("%s: got %d on %d\n", __func__, n, fd));
|
event_debug(("%s: got %d on %d\n", __func__, n, fd));
|
||||||
|
|
||||||
if (n == -1) {
|
if (n == -1) {
|
||||||
|
if (errno != EINTR && errno != EAGAIN) {
|
||||||
event_debug(("%s: evbuffer_read", __func__));
|
event_debug(("%s: evbuffer_read", __func__));
|
||||||
evhttp_connection_fail(evcon, EVCON_HTTP_EOF);
|
evhttp_connection_fail(evcon, EVCON_HTTP_EOF);
|
||||||
|
} else {
|
||||||
|
evhttp_add_event(&evcon->ev, evcon->timeout,
|
||||||
|
HTTP_READ_TIMEOUT);
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
} else if (n == 0) {
|
} else if (n == 0) {
|
||||||
/* Connection closed */
|
/* Connection closed */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user