My call to StartGame has the following three results
1. Succeeds (most of the time)
2. Fails with error - No game servers available (some of the time)
3. Hangs silently (occasionally)
I'm trying to figure out why #3 happens. My code properly handles #1 and #2. However, once #3 happens, subsequent calls to StartGame never return properly.
My code looks like this:
public static async Task<StartGameResponse> StartGame(string args, string ownerPlayFabId, Action<PlayFabError> onError) { DeveloperApi.Log("StartGame with args: " + args); var task = await PlayFabMatchmakerAPI.StartGameAsync(new StartGameRequest() { Build = BuildId, Region = Region, CustomCommandLineData = args, GameMode = GameMode, // TEMP: copied from Will's code. Just some random URL here. // for some reason, passing in null gives invalid input parameters // see Brendan email ExternalMatchmakerEventEndpoint = WWW.EscapeURL("https://hooks.zapier.com/hooks/catch/[commented out]"), }); if (task.Error != null) { if (!string.IsNullOrEmpty(ownerPlayFabId)) LobbyApi.LogPlayFabError(task.Error, ownerPlayFabId); if (onError != null) onError(task.Error); } return task.Result; }
Any errors should be logged, and I print "Finished StartGame" after the caller calls this function, so I am fairly confident that it is just hanging forever.