a06e0ef389
Fix reload signal in rc script [2] Fix use of IPv6 adresses in mod_extforward [3] Add optional support for mod_geoip [4] Move pkg-config to BUILD_DEPENDS References: http://redmine.lighttpd.net/issues/2197 [1] http://redmine.lighttpd.net/issues/1889 [3] http://redmine.lighttpd.net/wiki/1/Docs:ModGeoip [4] PR: ports/145749 [1], ports/148869 [2], ports/144110 [3], ports/137664 [4]
47 lines
1.2 KiB
C
47 lines
1.2 KiB
C
--- src/connections.c.orig
|
|
+++ src/connections.c
|
|
@@ -310,6 +310,8 @@ static int connection_handle_read_ssl(server *srv, connection *con) {
|
|
/* the other end close the connection -> KEEP-ALIVE */
|
|
|
|
return -2;
|
|
+ } else {
|
|
+ joblist_append(srv, con);
|
|
}
|
|
|
|
return 0;
|
|
@@ -320,6 +322,7 @@ static int connection_handle_read_ssl(server *srv, connection *con) {
|
|
#endif
|
|
}
|
|
|
|
+/* 0: everything ok, -1: error, -2: con closed */
|
|
static int connection_handle_read(server *srv, connection *con) {
|
|
int len;
|
|
buffer *b;
|
|
@@ -1180,15 +1183,20 @@ static handler_t connection_handle_fdevent(void *s, void *context, int revents)
|
|
|
|
joblist_append(srv, con);
|
|
|
|
- if (revents & FDEVENT_IN) {
|
|
- con->is_readable = 1;
|
|
-#if 0
|
|
- log_error_write(srv, __FILE__, __LINE__, "sd", "read-wait - done", con->fd);
|
|
-#endif
|
|
- }
|
|
- if (revents & FDEVENT_OUT) {
|
|
- con->is_writable = 1;
|
|
- /* we don't need the event twice */
|
|
+ if (con->conf.is_ssl) {
|
|
+ /* ssl may read and write for both reads and writes */
|
|
+ if (revents & (FDEVENT_IN | FDEVENT_OUT)) {
|
|
+ con->is_readable = 1;
|
|
+ con->is_writable = 1;
|
|
+ }
|
|
+ } else {
|
|
+ if (revents & FDEVENT_IN) {
|
|
+ con->is_readable = 1;
|
|
+ }
|
|
+ if (revents & FDEVENT_OUT) {
|
|
+ con->is_writable = 1;
|
|
+ /* we don't need the event twice */
|
|
+ }
|
|
}
|