Rider Linden 2019-03-18 14:05:02 -07:00
commit ee68e52dc8
2 changed files with 12 additions and 5 deletions

View File

@ -582,11 +582,12 @@ public:
/// Generate a distinct name for a listener -- see listen()
static std::string inventName(const std::string& pfx="listener");
private:
friend class LLEventPumps;
/// flush queued events
virtual void flush() {}
private:
friend class LLEventPumps;
virtual void reset();
@ -675,12 +676,14 @@ public:
virtual ~LLEventMailDrop() {}
/// Post an event to all listeners
virtual bool post(const LLSD& event);
virtual bool post(const LLSD& event) override;
/// Remove any history stored in the mail drop.
virtual void flush() override { mEventHistory.clear(); LLEventStream::flush(); };
protected:
virtual LLBoundListener listen_impl(const std::string& name, const LLEventListener&,
const NameList& after,
const NameList& before);
const NameList& before) override;
private:
typedef std::list<LLSD> EventList;
@ -703,7 +706,6 @@ public:
/// Post an event to all listeners
virtual bool post(const LLSD& event);
private:
/// flush queued events
virtual void flush();

View File

@ -1460,6 +1460,11 @@ bool LLVivoxVoiceClient::addAndJoinSession(const sessionStatePtr_t &nextSession)
LLSD timeoutResult(LLSDMap("session", "timeout"));
// We are about to start a whole new session. Anything that MIGHT still be in our
// maildrop is going to be stale and cause us much wailing and gnashing of teeth.
// Just flush it all out and start new.
voicePump.flush();
// It appears that I need to wait for BOTH the SessionGroup.AddSession response and the SessionStateChangeEvent with state 4
// before continuing from this state. They can happen in either order, and if I don't wait for both, things can get stuck.
// For now, the SessionGroup.AddSession response handler sets mSessionHandle and the SessionStateChangeEvent handler transitions to stateSessionJoined.