summaryrefslogtreecommitdiffstats
path: root/src/main.c
diff options
context:
space:
mode:
authortiptorrent development team <tiptorrent@soleta.eu>2021-09-18 23:17:29 +0200
committertiptorrent development team <tiptorrent@soleta.eu>2021-09-18 23:26:01 +0200
commit5ad75d7db0214cb68555d46d5f493fd50f317c9e (patch)
treecc66292c5f802f2b3b9f04027fff11b07fcd80be /src/main.c
parent6b47735b55df4c6ce34c534c2f0a26a01b5bb347 (diff)
report socket is connected, instead of connecting
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main.c b/src/main.c
index d3e0bfc..36cba55 100644
--- a/src/main.c
+++ b/src/main.c
@@ -308,6 +308,8 @@ static void tip_client_connect_cb(struct ev_loop *loop, struct ev_io *io, int ev
return;
}
+ syslog(LOG_INFO, "connected to %s to fetch file %s\n", addr, filename);
+
if (cli->state == TIP_CLIENT_NOTIFY_REDIRECT)
snprintf(buf, sizeof(buf), "POST /%s HTTP/1.1\r\n\r\n", filename);
else
@@ -368,8 +370,6 @@ static int tip_client_connect(const char *addr)
ev_io_init(&cli->io, tip_client_connect_cb, remote_fd, EV_WRITE);
ev_io_start(tip_main_loop, &cli->io);
- syslog(LOG_INFO, "connecting to %s to fetch file %s\n", addr, filename);
-
return 0;
}