carla-simulator/carla

port(streaming): ServerSession::CloseNow idempotency fix to ue5-dev

クローズ

#9,759 opened on 2026/05/27

 (0 件のコメント) (0 件のリアクション) (0 人の担当者)C++ (3,227 件のフォーク)batch import
Good community contribgood first issue

Repository metrics

Stars
 (10,105 個のスター)
PR merge metrics
 (平均マージ 17d 10h) (30d で 21 merged PRs)

説明

Context

PR #9740 fixed a double-close race in ServerSession::CloseNow() on ue4-dev when two async paths (deadline timer + a failing write) both triggered a close for the same session, _on_closed() -> DisconnectSession() was called twice, silently evicting a still-alive subscriber from the world-snapshot stream.

The fix adds std::atomic_bool _is_closed{false} to ServerSession and guards CloseNow() with _is_closed.exchange(true) so the close path runs exactly once.

Task

Port the fix from ue4-dev to ue5-dev.

Files to update:

  • LibCarla/source/carla/streaming/detail/tcp/ServerSession.h
  • LibCarla/source/carla/streaming/detail/tcp/ServerSession.cpp

References

  • Fix: #9740

コントリビューターガイド