Skip to content
This repository was archived by the owner on Dec 24, 2022. It is now read-only.

Commit e784f76

Browse files
committed
Merge pull request #205 from allthedrones/master
Catch wrapped SocketExceptions when SslStream.Write is being used.
2 parents c637a36 + cc497e1 commit e784f76

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/ServiceStack.Redis/RedisNativeClient_Utils.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -412,6 +412,15 @@ public bool FlushSendBuffer()
412412
}
413413
ResetSendBuffer();
414414
}
415+
catch (IOException ex) // several stream commands wrap SocketException in IOException
416+
{
417+
var socketEx = ex.InnerException as SocketException;
418+
if (socketEx == null)
419+
throw;
420+
421+
cmdBuffer.Clear();
422+
return HandleSocketException(socketEx);
423+
}
415424
catch (SocketException ex)
416425
{
417426
cmdBuffer.Clear();

0 commit comments

Comments
 (0)