1
Vote

New Session creation delay

description

I have following issue, need to know if its a bug?
When my app connects to the server and sends SESSIONCOUNT as a first command server replies with number of current sessions. But sometimes the result is 0 - sessions. Looks like there is a delay between session addition to SessionSource and socket initialization, because socket was able to receive and send data back, but session is not in the SessionSource collection yet. Is this a bug?

public override void ExecuteCommand(RemoteProcessSession session, StringCommandInfo commandInfo)
    {
        session.SendResponse(commandInfo.Data + " - {0}", session.AppServer.GetAllSessions().Count());
    }

comments

kerryjiang wrote Oct 13, 2011 at 1:22 AM

Yes, it is by design.
The sessions of method GetAllSessions() come from session snapshot which cannot update realtime.
I think you can use appServer.SessionCount instead.