From f935567cfdde7efac73ea2178d3f9dd42e66ec12 Mon Sep 17 00:00:00 2001 From: Louis DeJardin Date: Fri, 24 Jul 2015 15:36:45 -0700 Subject: [PATCH] Read callback status is always 0 for any error and EOF --- .../Http/ListenerSecondary.cs | 2 +- .../MultipleLoopTests.cs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Microsoft.AspNet.Server.Kestrel/Http/ListenerSecondary.cs b/src/Microsoft.AspNet.Server.Kestrel/Http/ListenerSecondary.cs index bb60b6d708..7bd97ed543 100644 --- a/src/Microsoft.AspNet.Server.Kestrel/Http/ListenerSecondary.cs +++ b/src/Microsoft.AspNet.Server.Kestrel/Http/ListenerSecondary.cs @@ -57,7 +57,7 @@ namespace Microsoft.AspNet.Server.Kestrel.Http (_1, _2, _3) => buf, (_1, status2, error2, state2) => { - if (status2 <= 0) + if (status2 == 0) { DispatchPipe.Dispose(); Marshal.FreeHGlobal(ptr); diff --git a/test/Microsoft.AspNet.Server.KestrelTests/MultipleLoopTests.cs b/test/Microsoft.AspNet.Server.KestrelTests/MultipleLoopTests.cs index 31e632340b..7a4d3bdb89 100644 --- a/test/Microsoft.AspNet.Server.KestrelTests/MultipleLoopTests.cs +++ b/test/Microsoft.AspNet.Server.KestrelTests/MultipleLoopTests.cs @@ -115,7 +115,7 @@ namespace Microsoft.AspNet.Server.KestrelTests (_3, cb, _4) => buf, (_3, status2, error2, _4) => { - if (status2 <= 0) + if (status2 == 0) { clientConnectionPipe.Dispose(); } @@ -203,7 +203,7 @@ namespace Microsoft.AspNet.Server.KestrelTests (_3, cb, _4) => buf, (_3, status2, error2, _4) => { - if (status2 <= 0) + if (status2 == 0) { clientConnectionPipe.Dispose(); return; @@ -216,7 +216,7 @@ namespace Microsoft.AspNet.Server.KestrelTests (_5, cb, _6) => buf2, (_5, status3, error3, _6) => { - if (status3 <= 0) + if (status3 == 0) { clientConnectionTcp.Dispose(); }