| 244 Connection *conn = io->request->connection; |
244 Connection *conn = io->request->connection; |
| 245 |
245 |
| 246 if(ev_pollin(h, conn->fd, io->io_event) != 0) { |
246 if(ev_pollin(h, conn->fd, io->io_event) != 0) { |
| 247 // TODO: ev_pollin should log, intercept some errors here |
247 // TODO: ev_pollin should log, intercept some errors here |
| 248 log_ereport(LOG_FAILURE, "Cannot enqueue connection"); |
248 log_ereport(LOG_FAILURE, "Cannot enqueue connection"); |
| 249 evt_request_error(h, event); |
249 event->finish = evt_request_error; |
| 250 } else { |
250 } else { |
| 251 // add request timeout |
251 // add request timeout |
| 252 io->watch.intdata = 1; |
252 io->watch.intdata = 1; |
| 253 io->watch.created = time(NULL); |
253 io->watch.created = time(NULL); |
| 254 io->watch.expire = io->watch.created + 240; // TODO: config |
254 io->watch.expire = io->watch.created + 240; // TODO: config |