Bug 545757: Don't post replies to the IO thread after a connection error. r=bent

--HG--
extra : transplant_source : %AB%07%AF%B8%C0L%CC%82%16%CDH%3Fg%87rH%60ekr
This commit is contained in:
Chris Jones 2010-02-11 17:33:53 -06:00
parent 5c88b2a100
commit 7e0bd1c978
2 changed files with 14 additions and 6 deletions

View File

@ -439,9 +439,13 @@ RPCChannel::DispatchIncall(const Message& call)
reply->set_seqno(call.seqno());
mIOLoop->PostTask(
FROM_HERE,
NewRunnableMethod(this, &RPCChannel::OnSend, reply));
{
MutexAutoLock lock(mMutex);
if (ChannelConnected == mChannelState)
mIOLoop->PostTask(
FROM_HERE,
NewRunnableMethod(this, &RPCChannel::OnSend, reply));
}
}
bool

View File

@ -168,9 +168,13 @@ SyncChannel::OnDispatchMessage(const Message& msg)
reply->set_seqno(msg.seqno());
mIOLoop->PostTask(
FROM_HERE,
NewRunnableMethod(this, &SyncChannel::OnSend, reply));
{
MutexAutoLock lock(mMutex);
if (ChannelConnected == mChannelState)
mIOLoop->PostTask(
FROM_HERE,
NewRunnableMethod(this, &SyncChannel::OnSend, reply));
}
}
//