mirror of
https://github.com/nodejs/node.git
synced 2026-11-21 12:59:16 -05:00
quic: fix premature unref of endpoint when listening
Signed-off-by: James M Snell <jasnell@gmail.com> PR-URL: https://github.com/nodejs/node/pull/63267 Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
This commit is contained in:
1 parent
b621fb3a18
commit
5d1ea79a83
1 file changed
+3
-1
@@ -735,7 +735,9 @@ void Endpoint::RemoveSession(const CID& cid,
|
||||
}
|
||||
}
|
||||
if (primary_session_count_ > 0 && --primary_session_count_ == 0) {
|
||||
udp_.Unref();
|
||||
if (!is_listening()) {
|
||||
udp_.Unref();
|
||||
}
|
||||
session_manager().RemoveSession(cid);
|
||||
// The endpoint may be idle (no sessions, not listening). MaybeDestroy
|
||||
// handles both closing (immediate destroy) and idle timeout (start
|
||||
|
||||
Reference in new issue
Block a user