fix: release a connection's gumps on disconnect (#2689)
`GumpSystem` clears a connection's gumps on `EventSink.Disconnected`, but `Mobile.NetState` raises it after the state is already null, so nothing is ever removed: every connection that touched a gump stays in `_gumps` until restart, with any gumps still open when it closed. It now listens to `BeforeDisconnected`, while `m.NetState` still returns the connection. That event also fires on login, where there is no previous state and the handler does nothing.
This commit is contained in:
parent
d26ae63e94
commit
ab89cd80f5
1 changed files with 1 additions and 1 deletions
|
|
@ -31,7 +31,7 @@ public static partial class GumpSystem
|
|||
{
|
||||
IncomingPackets.Register(0xB1, 0, true, &DisplayGumpResponse);
|
||||
|
||||
EventSink.Disconnected += EventSink_Disconnected;
|
||||
EventSink.BeforeDisconnected += EventSink_Disconnected;
|
||||
}
|
||||
|
||||
private static void EventSink_Disconnected(Mobile m)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue