|
|
@ -65,15 +65,14 @@ serverRun(Server this) |
|
|
* handle reads |
|
|
* handle reads |
|
|
*/ |
|
|
*/ |
|
|
else { |
|
|
else { |
|
|
serverRead(this, i); |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* do some other processing |
|
|
* do some other processing |
|
|
* @TODO: actually this will hard assume that our stream reader |
|
|
* @TODO: actually this will hard assume that our stream reader |
|
|
* is a http parser and it has its queue...think about more |
|
|
* is a http parser and it has its queue...think about more |
|
|
* generalizing here. |
|
|
* generalizing here. |
|
|
*/ |
|
|
*/ |
|
|
{ |
|
|
|
|
|
|
|
|
int size; |
|
|
|
|
|
if (0 < (size=serverRead(this, i))) { |
|
|
int j; |
|
|
int j; |
|
|
HttpRequestQueue queue = |
|
|
HttpRequestQueue queue = |
|
|
((HttpRequestParser)(this->conns)[fd].reader)->request_queue; |
|
|
((HttpRequestParser)(this->conns)[fd].reader)->request_queue; |
|
|
@ -143,7 +142,6 @@ serverRun(Server this) |
|
|
"write error, closing connection"); |
|
|
"write error, closing connection"); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
(this->fds)[i].events = (this->fds)[i].events & ~POLLOUT; |
|
|
|
|
|
serverCloseConn(this, i); |
|
|
serverCloseConn(this, i); |
|
|
} |
|
|
} |
|
|
else { |
|
|
else { |
|
|
|