Do not use event_loopexit with new event loop.

Signed-off-by: Jan Vidar Krey <janvidar@extatic.org>
This commit is contained in:
Jan Vidar Krey 2009-03-19 01:13:02 +01:00
parent 08351ea8e7
commit 1d491055c5

View File

@ -37,20 +37,17 @@ void hub_handle_signal(int fd, short events, void* arg)
{ {
struct hub_info* hub = (struct hub_info*) arg; struct hub_info* hub = (struct hub_info*) arg;
int signal = fd; int signal = fd;
struct timeval now = {0, 0};
switch (signal) switch (signal)
{ {
case SIGINT: case SIGINT:
hub_log(log_info, "Interrupted. Shutting down..."); hub_log(log_info, "Interrupted. Shutting down...");
hub->status = hub_status_shutdown; hub->status = hub_status_shutdown;
event_loopexit(&now);
break; break;
case SIGTERM: case SIGTERM:
hub_log(log_info, "Terminated. Shutting down..."); hub_log(log_info, "Terminated. Shutting down...");
hub->status = hub_status_shutdown; hub->status = hub_status_shutdown;
event_loopexit(&now);
break; break;
case SIGPIPE: case SIGPIPE:
@ -60,7 +57,6 @@ void hub_handle_signal(int fd, short events, void* arg)
case SIGHUP: case SIGHUP:
hub_log(log_info, "Caught hangup signal. Reloading configuration files..."); hub_log(log_info, "Caught hangup signal. Reloading configuration files...");
hub->status = hub_status_restart; hub->status = hub_status_restart;
event_loopexit(&now);
break; break;
case SIGUSR1: case SIGUSR1:
@ -77,7 +73,6 @@ void hub_handle_signal(int fd, short events, void* arg)
default: default:
hub_log(log_trace, "hub_handle_signal(): caught unknown signal: %d", signal); hub_log(log_trace, "hub_handle_signal(): caught unknown signal: %d", signal);
hub->status = hub_status_shutdown; hub->status = hub_status_shutdown;
event_loopexit(&now);
break; break;
} }
} }