Skip to content
This repository was archived by the owner on Sep 15, 2024. It is now read-only.

Commit 3d65713

Browse files
add reminder about PF
1 parent 2d5e07b commit 3d65713

2 files changed

Lines changed: 17 additions & 4 deletions

File tree

Scenes/Prefabs/CreateLobby.tscn

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ rect_min_size = Vector2( 550, 350 )
1313
size_flags_horizontal = 4
1414
size_flags_vertical = 4
1515
theme = ExtResource( 2 )
16+
window_title = "Make sure the port is port forwarded via your router!"
1617
script = ExtResource( 1 )
1718
__meta__ = {
1819
"_edit_use_anchors_": false

Scripts/Scenes/Game Servers/SceneGameServers.cs

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,8 @@ public async Task JoinServer(LobbyListing info, bool directConnect)
9292
GD.Print("Connecting to lobby...");
9393
NetworkManager.StartClient(info.Ip, info.Port);
9494

95-
await ClientConnect(async () => {
95+
await ClientConnect(async () =>
96+
{
9697
await NetworkManager.GameClient.Send(ClientPacketOpcode.Lobby, new CPacketLobby
9798
{
9899
LobbyOpcode = LobbyOpcode.LobbyJoin,
@@ -161,12 +162,23 @@ public async Task ListServers()
161162

162163
dummyClient.WasPingReceived = false;
163164
}
164-
catch (TaskCanceledException) { }
165+
catch (TaskCanceledException)
166+
{
167+
Logger.LogDebug("Dummy client task cancelled (A)");
168+
}
165169
}, CTSPingServers.Token);
166170

167171
tasks.Add(task);
168172

169-
await task;
173+
try
174+
{
175+
await task;
176+
} catch(TaskCanceledException)
177+
{
178+
Logger.LogDebug("Dummy client task cancelled (B)");
179+
}
180+
181+
170182

171183
if (!CTSPingServers.IsCancellationRequested)
172184
{
@@ -187,7 +199,7 @@ public async Task ListServers()
187199
UIGameServersNavBtns.BtnRefresh.Disabled = false;
188200
}
189201

190-
public async void PostServer(LobbyListing info)
202+
public async void PostServer(LobbyListing info)
191203
{
192204
await WebClient.Post("servers/add", new Dictionary<string, string>
193205
{

0 commit comments

Comments
 (0)