| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -736,7 +736,9 @@ void Endpoint::RemoveSession(const CID& cid, | |||
| 736 | 736 | } | |
| 737 | 737 | } | |
| 738 | 738 | if (primary_session_count_ > 0 && --primary_session_count_ == 0) { | |
| 739 | - udp_.Unref(); | ||
| 739 | + if (!is_listening()) { | ||
| 740 | + udp_.Unref(); | ||
| 741 | + } | ||
| 740 | 742 | session_manager().RemoveSession(cid); | |
| 741 | 743 | // The endpoint may be idle (no sessions, not listening). MaybeDestroy | |
| 742 | 744 | // handles both closing (immediate destroy) and idle timeout (start | |
| Back | FazBrowse Home | New Git URL |
0 commit comments