Skip to content

Commit 57c2e8f

Browse files
committed
refactor(WebSocket): 将TaskCompletionSource初始化语法改为显式构造
简化TaskCompletionSource的初始化语法,保持代码风格一致性
1 parent bd151b6 commit 57c2e8f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Runtime/Network/Network/WebSocket/NetworkManager.WebSocketNetSocket.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ private sealed class WebSocketNetSocket : INetworkSocket
1919
/// </summary>
2020
private bool _isConnecting = false;
2121

22-
private TaskCompletionSource<bool> _connectTask = new(TaskCreationOptions.RunContinuationsAsynchronously);
22+
private TaskCompletionSource<bool> _connectTask = new TaskCompletionSource<bool>(TaskCreationOptions.RunContinuationsAsynchronously);
2323
private readonly Action<byte[]> _onReceiveAction;
2424
private readonly Action<string, ushort> _onCloseAction;
2525

0 commit comments

Comments
 (0)