Skip to content

Commit

Permalink
fix socket connection failed cannot throw an exception (#736)
Browse files Browse the repository at this point in the history
  • Loading branch information
LUJIAN2020 authored Jun 28, 2024
1 parent 9b6e925 commit 8b69047
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/SuperSocket.Client/SocketConnector.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ protected override async ValueTask<ConnectState> ConnectAsync(EndPoint remoteEnd
var tcs = new TaskCompletionSource<bool>();
cancellationToken.Register(() => tcs.SetResult(false));

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

if (!socket.Connected)
{
Expand Down

0 comments on commit 8b69047

Please sign in to comment.