PlayFab / PlayFabMultiplayerUnreal

PlayFab Online Subsystem Plugin for Unreal Engine
https://learn.microsoft.com/en-us/gaming/playfab/features/multiplayer/networking/party-unreal-engine-oss-overview
39 stars 35 forks source link

Do not capture local variable by reference #65

Open bschatt opened 4 months ago

bschatt commented 4 months ago

FindSessionById and CreateSession are both asynchronous calls. It's possible for the delegate to get called immediately (in case some parameters are obviously wrong) but most of the time it will be called later. Some OSS also calls the delegate in the next tick in case there is an error.

It means that capturing bSuccess as reference in lambdas won't work properly most of the time.

yuehanlin commented 3 months ago

Hello Bastien, as always, thank you so much for the pull requests!! We've filed bugs internally and will integrate your contribution to future releases.