Fixed problem with LogoffDispatcher where it was reusing a single instance
for all clients in a non-reentrant manner. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@1566 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// $Id: PresentsClient.java,v 1.32 2002/05/31 07:33:33 mdb Exp $
|
// $Id: PresentsClient.java,v 1.33 2002/07/10 01:25:11 mdb Exp $
|
||||||
|
|
||||||
package com.threerings.presents.server;
|
package com.threerings.presents.server;
|
||||||
|
|
||||||
@@ -571,26 +571,22 @@ public class PresentsClient
|
|||||||
/**
|
/**
|
||||||
* Processes logoff requests.
|
* Processes logoff requests.
|
||||||
*/
|
*/
|
||||||
protected static class LogoffDispatcher
|
protected static class LogoffDispatcher implements MessageDispatcher
|
||||||
implements MessageDispatcher, Runnable
|
|
||||||
{
|
{
|
||||||
public void dispatch (PresentsClient client, UpstreamMessage msg)
|
public void dispatch (final PresentsClient client, UpstreamMessage msg)
|
||||||
{
|
{
|
||||||
Log.info("Client requested logoff " +
|
Log.info("Client requested logoff " +
|
||||||
"[client=" + client + "].");
|
"[client=" + client + "].");
|
||||||
_client = client;
|
|
||||||
// queue ourselves up to be run on the object manager thread
|
|
||||||
// where we can safely end the session
|
|
||||||
PresentsServer.omgr.postUnit(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void run ()
|
// queue up a runnable on the object manager thread where we
|
||||||
{
|
// can safely end the session
|
||||||
// end the session in a civilized manner
|
PresentsServer.omgr.postUnit(new Runnable() {
|
||||||
_client.endSession();
|
public void run () {
|
||||||
|
// end the session in a civilized manner
|
||||||
|
client.endSession();
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
protected PresentsClient _client;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected ClientManager _cmgr;
|
protected ClientManager _cmgr;
|
||||||
|
|||||||
Reference in New Issue
Block a user