diff options
Diffstat (limited to 'accel-pppd/ctrl/sstp')
-rw-r--r-- | accel-pppd/ctrl/sstp/sstp.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/accel-pppd/ctrl/sstp/sstp.c b/accel-pppd/ctrl/sstp/sstp.c index d9def425..7175c826 100644 --- a/accel-pppd/ctrl/sstp/sstp.c +++ b/accel-pppd/ctrl/sstp/sstp.c @@ -2832,6 +2832,7 @@ static struct sstp_serv_t serv = { static void sstp_init(void) { struct sockaddr_t *addr = &serv.addr; + struct linger linger; struct stat st; int port, value; char *opt; @@ -2882,6 +2883,11 @@ static void sstp_init(void) } else { value = 1; setsockopt(serv.hnd.fd, SOL_SOCKET, SO_REUSEADDR, &value, sizeof(value)); + + /* quick timeout */ + linger.l_onoff = 1; + linger.l_linger = 5; + setsockopt(serv.hnd.fd, SOL_SOCKET, SO_LINGER, &linger, sizeof(linger)); } if (bind(serv.hnd.fd, &addr->u.sa, addr->len) < 0) { |