From 71c709c61755310aaf60bd038ce171ebd0ef0040 Mon Sep 17 00:00:00 2001 From: Grigorii Demidov Date: Fri, 14 Dec 2018 13:31:47 +0100 Subject: daemon: proper processing of unsuccessful TLS rehandshake --- daemon/session.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'daemon/session.c') diff --git a/daemon/session.c b/daemon/session.c index db238233..c870d8cd 100644 --- a/daemon/session.c +++ b/daemon/session.c @@ -136,7 +136,7 @@ int session_waitinglist_push(struct session *session, struct qr_task *task) struct qr_task *session_waitinglist_get(const struct session *session) { - return queue_head(session->waiting); + return (queue_len(session->waiting) > 0) ? (queue_head(session->waiting)) : NULL; } struct qr_task *session_waitinglist_pop(struct session *session, bool deref) -- cgit v1.2.3