From f93c87cfb2c3eabdf27577ce352cf1630d6350f6 Mon Sep 17 00:00:00 2001 From: Michael Bayne Date: Thu, 11 Dec 2003 18:47:43 +0000 Subject: [PATCH] Properly manage the _pending flag in requestFailed(). git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@2906 542714f4-19e9-0310-aa3c-eee0fc999fb1 --- .../com/threerings/presents/util/SafeSubscriber.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/java/com/threerings/presents/util/SafeSubscriber.java b/src/java/com/threerings/presents/util/SafeSubscriber.java index 141648654..3c16dbced 100644 --- a/src/java/com/threerings/presents/util/SafeSubscriber.java +++ b/src/java/com/threerings/presents/util/SafeSubscriber.java @@ -1,5 +1,5 @@ // -// $Id: SafeSubscriber.java,v 1.2 2003/12/11 18:46:02 mdb Exp $ +// $Id: SafeSubscriber.java,v 1.3 2003/12/11 18:47:43 mdb Exp $ package com.threerings.presents.util; @@ -168,6 +168,14 @@ public class SafeSubscriber // documentation inherited from interface public void requestFailed (int oid, ObjectAccessException cause) { + // do the right thing with our pending state + if (!_pending) { + Log.warning("Criminy creole! Our subscribe failed but we're " + + "not pending!? " + this); + // go with our badselves, it's the only way + } + _pending = false; + // if we're active, let our subscriber know that the shit hit the fan if (_active) { _subscriber.requestFailed(oid, cause);