mirror of
https://gitlab.com/openconnect/ocserv.git
synced 2026-10-14 02:22:03 +08:00
use non-blocking sockets in worker process
This commit is contained in:
-15
@@ -68,21 +68,6 @@ unsigned int need_maintenance = 0;
|
||||
static unsigned int need_children_cleanup = 0;
|
||||
sigset_t sig_default_set;
|
||||
|
||||
static void ms_sleep(unsigned ms)
|
||||
{
|
||||
struct timespec tv;
|
||||
|
||||
tv.tv_sec = 0;
|
||||
tv.tv_nsec = ms * 1000 * 1000;
|
||||
|
||||
while(tv.tv_nsec >= 1000000000) {
|
||||
tv.tv_nsec -= 1000000000;
|
||||
tv.tv_sec++;
|
||||
}
|
||||
|
||||
nanosleep(&tv, NULL);
|
||||
}
|
||||
|
||||
static void add_listener(void *pool, struct listen_list_st *list,
|
||||
int fd, int family, int socktype, int protocol,
|
||||
struct sockaddr* addr, socklen_t addr_len)
|
||||
|
||||
Reference in New Issue
Block a user