Skip to content

Commit 8b69047

Browse files
authored
fix socket connection failed cannot throw an exception (kerryjiang#736)
1 parent 9b6e925 commit 8b69047

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/SuperSocket.Client/SocketConnector.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ protected override async ValueTask<ConnectState> ConnectAsync(EndPoint remoteEnd
4949
var tcs = new TaskCompletionSource<bool>();
5050
cancellationToken.Register(() => tcs.SetResult(false));
5151

52-
await Task.WhenAny(new[] { connectTask, tcs.Task });
52+
await Task.WhenAny(new[] { connectTask, tcs.Task }).Unwrap();
5353

5454
if (!socket.Connected)
5555
{

0 commit comments

Comments
 (0)