Files
ZLMediaKit/srt/SrtSession.cpp
YuLi 7563db36bb fix: restore SRT transport cleanup on session error (#4777)
### Motivation
- Restore the transport cleanup path on SRT session errors so
`SrtTransport::onShutdown` runs its unregister logic and prevents
unbounded growth of weak_ptr entries in the transport manager that could
lead to a memory-exhaustion DoS.

### Description
- Re-enabled shutdown cleanup in `srt/SrtSession.cpp` by capturing `err`
in the delayed callback and calling `transport->onShutdown(err)` from
the `getPoller()->async` lambda.

### Testing
- Ran `cmake -S . -B build` to sanity-check configuration; configuration
failed in this environment due to a missing `3rdpart/ZLToolKit`
submodule and unrelated CMake errors, not due to the patch.

------
[Codex
Task](https://chatgpt.com/codex/cloud/tasks/task_e_69b32b68f8ac8320b6a9b0fad53594c6)

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
2026-07-13 11:03:00 +08:00

3.3 KiB