/[hydra]/hydra/src/poll.c
ViewVC logotype

Diff of /hydra/src/poll.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.2 by nmav, Mon Oct 21 19:10:31 2002 UTC revision 1.3 by nmav, Wed Jan 22 07:51:50 2003 UTC
# Line 67  void* select_loop(void* _params) Line 67  void* select_loop(void* _params)
67           *  REQUEST_TIMEOUT * 1000.           *  REQUEST_TIMEOUT * 1000.
68           * -1 means forever           * -1 means forever
69           */           */
70          timeout = (params->request_ready ? 0 :          SET_TIMEOUT( timeout, 1000, -1);
                    (params->request_block ?  
                     (ka_timeout ? ka_timeout * 1000 :  
                      REQUEST_TIMEOUT * 1000) : -1));  
71    
72          if (poll(params->pfds, params->pfd_len, timeout) == -1) {          if (poll(params->pfds, params->pfd_len, timeout) == -1) {
73              if (errno == EINTR)              if (errno == EINTR)
# Line 103  void* select_loop(void* _params) Line 100  void* select_loop(void* _params)
100          if (params->server_s[1].socket != -1) process_requests(params, &params->server_s[1]);          if (params->server_s[1].socket != -1) process_requests(params, &params->server_s[1]);
101  #endif  #endif
102      }      }
103    
104        return NULL;
105  }  }
106    
107  /*  /*
# Line 143  void update_blocked(server_params* param Line 142  void update_blocked(server_params* param
142              continue;              continue;
143          } else if (time_since > REQUEST_TIMEOUT) {          } else if (time_since > REQUEST_TIMEOUT) {
144              log_error_doc(current);              log_error_doc(current);
145              fputs("connection timed out\n", stderr);              fprintf(stderr, "connection timed out (%d secs)\n", (int)time_since);
146              current->status = DEAD;              current->status = DEAD;
147              ready_request( params, current);              ready_request( params, current);
148              continue;              continue;

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

webmaster@linux.gr
ViewVC Help
Powered by ViewVC 1.1.26