Skip to content

Commit 9fd9589

Browse files
lePicimichalvasko
authored andcommitted
session UPDATE rw socket for inactive client
A close-session message is not sent and also the socket is not read if the netconf server terminates the connection due to an inactive client.
1 parent 12ec499 commit 9fd9589

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/session.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -949,7 +949,7 @@ nc_session_free(struct nc_session *session, void (*data_free)(void *))
949949
nc_session_client_msgs_unlock(session, __func__);
950950
}
951951

952-
if (session->status == NC_STATUS_RUNNING) {
952+
if ((session->status == NC_STATUS_RUNNING) && nc_session_is_connected(session)) {
953953
/* receive any leftover messages */
954954
while (nc_read_msg_poll_io(session, 0, &msg) == 1) {
955955
ly_in_free(msg, 1);

0 commit comments

Comments
 (0)