diff --git a/cgi.d b/cgi.d index 3722dd9..db17187 100644 --- a/cgi.d +++ b/cgi.d @@ -6103,8 +6103,9 @@ void runAddonServer(EIS)(string localListenerName, EIS eis) if(is(EIS : EventIoS epoll_event[64] events; } else { pollfd[] pollfds; - pollfds ~= pollfd(sock, POLLIN); IoOp*[int] ioops; + pollfds ~= pollfd(sock, POLLIN); + ioops[sock] = acceptOp; } while(true) { @@ -6123,6 +6124,7 @@ void runAddonServer(EIS)(string localListenerName, EIS eis) if(is(EIS : EventIoS } } else { int nfds = poll(pollfds.ptr, cast(int) pollfds.length, timeout_milliseconds); + size_t lastIdx = 0; } if(nfds == 0) { @@ -6134,7 +6136,14 @@ void runAddonServer(EIS)(string localListenerName, EIS eis) if(is(EIS : EventIoS auto flags = events[idx].events; auto ioop = cast(IoOp*) events[idx].data.ptr; } else { - auto ioop = ioops[pollfds[idx].fd]; + IoOp* ioop; + foreach(tidx, thing; pollfds[lastIdx .. $]) { + if(thing.revents) { + ioop = ioops[thing.fd]; + lastIdx += tidx + 1; + break; + } + } } //writeln(flags, " ", ioop.fd); @@ -6174,6 +6183,7 @@ void runAddonServer(EIS)(string localListenerName, EIS eis) if(is(EIS : EventIoS } if(!found) pollfds ~= pollfd(ns, POLLIN); + ioops[ns] = niop; } } } diff --git a/http2.d b/http2.d index 21fcc11..61fd9f0 100644 --- a/http2.d +++ b/http2.d @@ -20,6 +20,7 @@ version(without_openssl) {} else { version=use_openssl; version=with_openssl; +version(older_openssl) {} else version=newer_openssl; }