diff --git a/src/mirror.c b/src/mirror.c index 85b6b48..422b48e 100644 --- a/src/mirror.c +++ b/src/mirror.c @@ -710,6 +710,9 @@ void mirror_run( struct server *serve ) /* Start by writing xfer 0 to the listener */ ev_io_start( ctrl.ev_loop, &ctrl.write_watcher ); + /* We want to timeout during the first write as well as subsequent ones */ + ev_timer_again( ctrl.ev_loop, &ctrl.timeout_watcher ); + /* Everything up to here is blocking. We switch to non-blocking so we * can handle rate-limiting and weird error conditions better. TODO: We * should expand the event loop upwards so we can do the same there too */