From 8319805cb6bf27dfc05df6b02952ad5d4edd765d Mon Sep 17 00:00:00 2001 From: Dusan Stevanovic Date: Mon, 13 Jan 2025 10:51:28 +0100 Subject: [PATCH] in bad network conditions econn might be null and ccall stuck in TERMINATING state --- src/ccall/ccall.c | 2 +- src/ecall/ecall.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ccall/ccall.c b/src/ccall/ccall.c index 00b9752b3..0e07c22f8 100644 --- a/src/ccall/ccall.c +++ b/src/ccall/ccall.c @@ -3824,7 +3824,7 @@ static void ccall_end_with_err(struct ccall *ccall, int err) } userlist_incall_clear(ccall->userl, false, false); - if (ccall->ecall) + if (ccall->ecall && ecall_get_econn(ccall->ecall)) ecall_end(ccall->ecall); else set_state(ccall, CCALL_STATE_IDLE); diff --git a/src/ecall/ecall.c b/src/ecall/ecall.c index f5e62b8a2..c31524823 100644 --- a/src/ecall/ecall.c +++ b/src/ecall/ecall.c @@ -2422,7 +2422,7 @@ void ecall_end(struct ecall *ecall) if (!ecall) return; - info("ecall(%p): [self=%s] end\n", ecall, anon_id(userid_anon, ecall->userid_self)); + info("ecall(%p): [self=%s] econn: %p end\n", ecall, anon_id(userid_anon, ecall->userid_self), ecall->econn); /* disconnect all connections */ econn_end(ecall->econn);