Skip to content

Commit

Permalink
fixed the RequestFilterFactory checking issue
Browse files Browse the repository at this point in the history
  • Loading branch information
kerryjiang committed Oct 29, 2012
1 parent bebd6b5 commit 83b4f9b
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions SocketBase/AppServerBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -349,14 +349,6 @@ private bool SetupMedium(IRequestFilterFactory<TRequestInfo> requestFilterFactor
if (requestFilterFactory != null)
RequestFilterFactory = requestFilterFactory;

if (RequestFilterFactory == null)
{
if (Logger.IsErrorEnabled)
Logger.Error("RequestFilterFactory is required!");

return false;
}

if (connectionFilters != null && connectionFilters.Any())
{
if (m_ConnectionFilters == null)
Expand Down Expand Up @@ -404,6 +396,15 @@ private void OnCommandSetup(IDictionary<string, ICommand<TAppSession, TRequestIn

private bool SetupFinal()
{
//Check RequestFilterFactory
if (RequestFilterFactory == null)
{
if (Logger.IsErrorEnabled)
Logger.Error("RequestFilterFactory is required!");

return false;
}

var plainConfig = Config as ServerConfig;

if (plainConfig == null)
Expand Down Expand Up @@ -568,7 +569,7 @@ public bool Setup(IRootConfig rootConfig, IServerConfig config, ISocketServerFac
return false;

if (!Setup(rootConfig, config))
return false;
return false;

if (!SetupFinal())
return false;
Expand Down

0 comments on commit 83b4f9b

Please sign in to comment.