summaryrefslogtreecommitdiffstats
path: root/server.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@openbsd.org>2009-11-04 23:12:43 +0000
committerNicholas Marriott <nicm@openbsd.org>2009-11-04 23:12:43 +0000
commitb3c4956efeb62bae3c9ac64eab2371bb6384623a (patch)
treeb1209f1fcb7185359eb6931600ecffd824a62da7 /server.c
parent6a6a42aa3a6ebfedc428288babfb9e0b856d5732 (diff)
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.
Diffstat (limited to 'server.c')
-rw-r--r--server.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/server.c b/server.c
index eb215009..4c1f9cea 100644
--- a/server.c
+++ b/server.c
@@ -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);