Don't reenlist the client imsg event every loop, instead have a small function

to it and call it after the event triggers or after a imsg is added.
This commit is contained in:
Nicholas Marriott
2009-11-04 23:12:43 +00:00
parent 6a6a42aa3a
commit b3c4956efe
4 changed files with 22 additions and 30 deletions

View File

@ -160,11 +160,11 @@ server_start(char *path)
log_debug("socket path %s", socket_path);
setproctitle("server (%s)", rpathbuf);
event_init();
server_fd = server_create_socket();
server_client_create(pair[1]);
event_init();
if (access(SYSTEM_CFG, R_OK) == 0) {
if (load_cfg(SYSTEM_CFG, NULL, &cause) != 0)
goto error;
@ -215,8 +215,6 @@ server_loop(void)
while (!server_should_shutdown()) {
server_update_socket();
server_client_prepare();
event_loopexit(&tv);
event_loop(EVLOOP_ONCE);