From e36ee5e7ac9a99951c06d93d78ccfa106969eacc Mon Sep 17 00:00:00 2001 From: sta Date: Thu, 26 May 2016 14:22:00 +0900 Subject: [PATCH] [Modify] Move it --- websocket-sharp/Net/HttpConnection.cs | 3 +++ websocket-sharp/Net/HttpListener.cs | 3 --- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/websocket-sharp/Net/HttpConnection.cs b/websocket-sharp/Net/HttpConnection.cs index 6011ef68..89b5fff0 100644 --- a/websocket-sharp/Net/HttpConnection.cs +++ b/websocket-sharp/Net/HttpConnection.cs @@ -302,6 +302,9 @@ namespace WebSocketSharp.Net conn._lastListener = lsnr; } + if (!conn._context.Authenticate ()) + return; + if (conn._context.Register ()) conn._contextRegistered = true; diff --git a/websocket-sharp/Net/HttpListener.cs b/websocket-sharp/Net/HttpListener.cs index ed6358c2..c8334987 100644 --- a/websocket-sharp/Net/HttpListener.cs +++ b/websocket-sharp/Net/HttpListener.cs @@ -582,9 +582,6 @@ namespace WebSocketSharp.Net if (!_listening) return false; - if (!context.Authenticate ()) - return false; - lock (_ctxRegistrySync) { if (!_listening) return false;