stun

simple point to point tunnel
git clone git://git.2f30.org/stun.git
Log | Files | Refs | README

commit bdad0d6d7657249906370ec612d281275685bc8c
parent bb26c3a4acc8ccf3b2a0acdaaa41c1e273dc8abe
Author: sin <sin@2f30.org>
Date:   Sat Apr  2 09:28:10 +0100

don't terminate if accept fails

Diffstat:
stun.c | 7+++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/stun.c b/stun.c @@ -637,8 +637,11 @@ serversetup(int devfd) for (;;) { netfd = accept(listenfd, (struct sockaddr *)&remote, (socklen_t []){sizeof(remote)}); - if (netfd < 0) - logerr("accept failed"); + if (netfd < 0) { + if (errno != ECONNABORTED) + logwarn("accept failed"); + continue; + } if (debug) logdbg("remote peer connected: %s", inet_ntoa(remote.sin_addr));