Skip to content

Commit

Permalink
missing event of IoConnector
Browse files Browse the repository at this point in the history
  • Loading branch information
longshine committed Jun 11, 2017
1 parent 2318b5c commit 98ac3c3
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Mina.NET/Core/Service/AbstractIoService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,14 @@ void IoServiceSupport.FireServiceIdle(IdleStatus idleStatus)

void IoServiceSupport.FireSessionCreated(IoSession session)
{
if (session.Service is IoConnector)
{
// If the first connector session, fire a virtual service activation event.
Boolean firstSession = _managedSessions.IsEmpty;
if (firstSession)
((IoServiceSupport)this).FireServiceActivated();
}

// If already registered, ignore.
if (!_managedSessions.TryAdd(session.Id, session))
return;
Expand Down

0 comments on commit 98ac3c3

Please sign in to comment.