mirror of
https://github.com/nodejs/node.git
synced 2026-11-30 11:55:44 -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
f940d6b1be
commit
9bc875e522
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