From eaa270be35b254324dcfe30ebe05f84d6f275558 Mon Sep 17 00:00:00 2001 From: Jamie Doornbos Date: Sun, 4 Jan 2009 06:09:36 +0000 Subject: [PATCH] Stop java clients from queueing up ticks after logoff. This was sometimes causing a warning during shutdown. git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5614 542714f4-19e9-0310-aa3c-eee0fc999fb1 --- src/java/com/threerings/presents/client/Client.java | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/java/com/threerings/presents/client/Client.java b/src/java/com/threerings/presents/client/Client.java index e8f55fa19..633e64ca3 100644 --- a/src/java/com/threerings/presents/client/Client.java +++ b/src/java/com/threerings/presents/client/Client.java @@ -794,6 +794,13 @@ public class Client protected synchronized void cleanup (final Exception logonError) { + // kill our tick interval here, otherwise we may get a tick call after the runnable below + // has finished + if (_tickInterval != null) { + _tickInterval.cancel(); + _tickInterval = null; + } + // we know that prior to the call to this method, the observers were notified with // CLIENT_DID_LOGOFF; that may not have been invoked yet, so we don't want to clear out our // communicator reference immediately; instead we queue up a runnable unit to do so to @@ -812,12 +819,6 @@ public class Client _connectionId = _cloid = -1; _standalone = false; - // kill our tick interval - if (_tickInterval != null) { - _tickInterval.cancel(); - _tickInterval = null; - } - // and let our invocation director know we're logged off _invdir.cleanup();