mirror of
https://bitbucket.org/jsuto/piler.git
synced 2025-06-13 12:17:02 +02:00
@ -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++){
|
||||
|
Reference in New Issue
Block a user