Skip to content

Commit 422af30

Browse files
committed
server BUGFIX handle session termination correctly
Fixes #308
1 parent 21fceb7 commit 422af30

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

server/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1287,7 +1287,7 @@ worker_thread(void *arg)
12871287
/* listen for incoming requests on active NETCONF sessions */
12881288
rc = nc_ps_poll(np2srv.nc_ps, 0, &ncs);
12891289

1290-
if (rc & (NC_PSPOLL_NOSESSIONS | NC_PSPOLL_TIMEOUT | NC_PSPOLL_ERROR)) {
1290+
if ((rc & (NC_PSPOLL_NOSESSIONS | NC_PSPOLL_TIMEOUT | NC_PSPOLL_ERROR)) && !(rc & NC_PSPOLL_SESSION_TERM)) {
12911291
/* if there is no active session, timeout, or an error, rest for a while */
12921292
pthread_rwlock_unlock(&np2srv.ly_ctx_lock);
12931293
np_sleep(10);

0 commit comments

Comments
 (0)