mirror of
https://bitbucket.org/jsuto/piler.git
synced 2024-12-24 19:30:12 +01:00
src: timeout check fix
Signed-off-by: Janos SUTO <sj@acts.hu>
This commit is contained in:
parent
9646225ae9
commit
6af77bf0f1
@ -182,8 +182,6 @@ int main(int argc, char **argv){
|
||||
set_signal_handler(SIGALRM, check_for_client_timeout);
|
||||
set_signal_handler(SIGHUP, initialise_configuration);
|
||||
|
||||
alarm(timeout);
|
||||
|
||||
// calloc() initialitizes the allocated memory
|
||||
|
||||
sessions = calloc(cfg.max_connections, sizeof(struct smtp_session));
|
||||
@ -202,6 +200,8 @@ int main(int argc, char **argv){
|
||||
if(daemonise == 1 && daemon(1, 0) == -1) fatal(ERR_DAEMON);
|
||||
#endif
|
||||
|
||||
alarm(timeout);
|
||||
|
||||
for(;;){
|
||||
n = epoll_wait(efd, events, cfg.max_connections, -1);
|
||||
for(i=0; i<n; i++){
|
||||
|
Loading…
Reference in New Issue
Block a user