Skip to content

bugfix(lan): Delete the lobby player when they leave the lobby - #3499

Open
tintinhamans wants to merge 1 commit into
TheSuperHackers:mainfrom
tintinhamans:arctic/fix/lan-lobby-leave-leak
Open

tintinhamans wants to merge 1 commit into
TheSuperHackers:mainfrom
tintinhamans:arctic/fix/lan-lobby-leave-leak

Conversation

@tintinhamans

Copy link
Copy Markdown

handleRequestLobbyLeave unlinks the leaving player with removePlayer but never deletes it, so every player who leaves the LAN lobby leaks a LANPlayer. The timeout path in LANAPI::update already deletes it.

@coderabbitai

coderabbitai Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: e35b25ba-2466-471d-8f08-567815ba2ff4

📥 Commits

Reviewing files that changed from the base of the PR and between 2d6761c and 7a9cc5a.


📒 Files selected for processing (1)
  • Core/GameEngine/Source/GameNetwork/LANAPIhandlers.cpp

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 2 remain after this review.



Walkthrough

The lobby leave handler now deletes the matching player object after removing it from the lobby player list.

Changes

Lobby leave cleanup

Layer / File(s) Summary
Delete removed player
Core/GameEngine/Source/GameNetwork/LANAPIhandlers.cpp
After removing the matching player from the lobby player list, the handler deletes the player object.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~2 minutes

Change: Bug fix

Suggested reviewers: bobtista

Merge Risk: ⚪ Minimal · up to 7a9cc

No actionable merge-blocking risk is established in the reviewed change.

Pre-merge checks · Passed 4
Passed Passed checks (4 passed)
Check name Status Explanation
Title check Passed The title clearly and concisely describes the main change: deleting the lobby player when the player leaves the LAN lobby.
Description check Passed The description accurately explains the memory leak, identifies the missing deletion, and references the existing timeout cleanup path.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@greptile-apps

greptile-apps Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

RetriggerConfidence Score: 5/5

[High impact] The PR appears safe to merge and fixes the lobby player leak.

Summary

Fixes the LAN lobby memory leak by deleting the departing LANPlayer after removing it from the list.

  • LAN lobby departures now remove and free the matching player.

Reviews (1) · Last reviewed commit: "bugfix(lan): Delete the lobby player whe..." · Reviewed by Greptile

@Mauller Mauller left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

simple

@tintinhamans tintinhamans added Bug Something is not working right, typically is user facing Minor Severity: Minor < Major < Critical < Blocker Network Anything related to network, servers Gen Relates to Generals ZH Relates to Zero Hour Memory Is memory related labels Oct 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug Something is not working right, typically is user facing Gen Relates to Generals Memory Is memory related Minor Severity: Minor < Major < Critical < Blocker Network Anything related to network, servers ZH Relates to Zero Hour

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants