@@ -121,7 +121,7 @@ public async UniTask<OperationResultDto> ExecuteOperation(LobbyOperation message
121121 private async UniTask < OperationResultDto > ExecuteOperationInternal ( LobbyOperation message , CancellationToken ct )
122122 {
123123 using var linkedCts = CancellationTokenSource . CreateLinkedTokenSource ( Token , ct ) ;
124- var task = WaitForOperationResult ( message . OperationId , ElympicsTimeout . WebSocketOperationTimeout , linkedCts . Token ) ;
124+ var task = WaitForOperationResult ( message . OperationId , ElympicsTimeout . WebSocketOperationTimeout , $ " { nameof ( ExecuteOperationInternal ) } { message . GetType ( ) . Name } with { nameof ( message . OperationId ) } : { message . OperationId } " , linkedCts . Token ) ;
125125 SendMessage ( message ) ;
126126 return await task ;
127127 }
@@ -168,6 +168,7 @@ private async UniTask OpenWebSocket(IWebSocket ws)
168168 {
169169 var openTask = ResultUtils . WaitForResult < ValueTuple , WebSocketOpenEventHandler > ( ElympicsTimeout . WebSocketOpeningTimeout ,
170170 tcs => ( ) => tcs . TrySetResult ( new ValueTuple ( ) ) ,
171+ nameof ( OpenWebSocket ) ,
171172 handler => ws . OnOpen += handler ,
172173 handler => ws . OnOpen -= handler ,
173174 Token ) ;
@@ -342,9 +343,10 @@ private async UniTask PropagateDisconnection(DisconnectionReason reason)
342343 Disconnected ? . Invoke ( data ) ;
343344 }
344345
345- private UniTask < OperationResultDto > WaitForOperationResult ( Guid operationId , TimeSpan timeout , CancellationToken ct ) =>
346+ private UniTask < OperationResultDto > WaitForOperationResult ( Guid operationId , TimeSpan timeout , string operationName , CancellationToken ct ) =>
346347 ResultUtils . WaitForResult < OperationResultDto , Action < OperationResultDto > > ( timeout ,
347348 tcs => result => _ = result . Success ? tcs . TrySetResult ( result ) : tcs . TrySetException ( new LobbyOperationException ( result ) ) ,
349+ operationName ,
348350 handler => _operationResultHandlers . TryAdd ( operationId , handler ) ,
349351 _ => _operationResultHandlers . TryRemove ( operationId , out var _ ) ,
350352 ct ) ;
@@ -354,6 +356,7 @@ private async UniTask<TData> WaitForLobbyData<TData>(Guid requestId, TimeSpan ti
354356 {
355357 var result = await ResultUtils . WaitForResult < IFromLobby , Action < IFromLobby > > ( timeout ,
356358 tcs => result => _ = tcs . TrySetResult ( result ) ,
359+ $ "{ nameof ( WaitForLobbyData ) } { nameof ( TData ) } with { nameof ( requestId ) } : { requestId } ",
357360 handler => _dataResponses . TryAdd ( requestId , handler ) ,
358361 _ => _dataResponses . TryRemove ( requestId , out var _ ) ,
359362 ct ) ;
0 commit comments