Make ConnectionCallback static again.

This commit is contained in:
Ivan Derevyanko 2015-09-09 02:13:49 +02:00
parent 2b2943d5b0
commit ac77c11211
2 changed files with 5 additions and 4 deletions

View File

@ -50,15 +50,16 @@ namespace Microsoft.AspNet.Server.Kestrel.Http
/// </summary> /// </summary>
protected abstract UvStreamHandle CreateListenSocket(string host, int port); protected abstract UvStreamHandle CreateListenSocket(string host, int port);
protected void ConnectionCallback(UvStreamHandle stream, int status, Exception error, object state) protected static void ConnectionCallback(UvStreamHandle stream, int status, Exception error, object state)
{ {
var listener = (Listener) state;
if (error != null) if (error != null)
{ {
Log.LogError("Listener.ConnectionCallback ", error); listener.Log.LogError("Listener.ConnectionCallback ", error);
} }
else else
{ {
((Listener)state).OnConnection(stream, status); listener.OnConnection(stream, status);
} }
} }