Skip to content

Commit

Permalink
Fix issue with AP menu not resetting connection
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris-Is-Awesome committed Jul 20, 2024
1 parent f1a5a0f commit 4a5003e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Code/APHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public PlayerInfo CurrentPlayer
return Session.Players.GetPlayerInfo(Session.ConnectionInfo.Slot);
}
}
public bool IsConnected { get { return Session != null; } }
public bool IsConnected { get { return Session != null && Session.Socket.Connected; } }
public ArchipelagoSession Session { get; private set; }

public APHandler()
Expand Down
2 changes: 2 additions & 0 deletions Code/APMenuStuff.cs
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,8 @@ private void ShowAPMenu()
{
HideAPButton();

APHandler.Instance.Disconnect();

// Prefill fields in AP menu
if (isInFileSelectMenu)
PrefillAPMenuFields();
Expand Down

0 comments on commit 4a5003e

Please sign in to comment.