commit - 0828da2ca72a11090a29c8f94930781558e611c3
commit + f56227b6e7b21c76f910ad384ee793c08f20ed54
blob - 5feaeb798249d22fa5a82b0612d41338208e18b3
blob + 4e4ecbf9ec80c874ee3acfb1454ef4a716f1745d
--- lstun.c
+++ lstun.c
log_debug("incoming connection");
- if (evtimer_pending(&timeoutev, NULL))
- evtimer_del(&timeoutev);
-
if ((s = accept(fd, NULL, 0)) == -1) {
log_warn("accept");
return;
}
- conn++;
-
if (ssh_pid == -1 && spawn_ssh() == -1) {
close(s);
return;
return;
}
+ conn++;
+ if (evtimer_pending(&timeoutev, NULL))
+ evtimer_del(&timeoutev);
+
c->source = s;
c->to = -1;
c->retry.tv_sec = BACKOFF;