Browse Source

Merge pull request #571 from ethereum/network

thread-safety, WhisperPeer::sendMessages()
cl-refactor
Gav Wood 10 years ago
parent
commit
330aa62aaf
  1. 6
      libwhisper/WhisperPeer.cpp

6
libwhisper/WhisperPeer.cpp

@ -81,11 +81,9 @@ bool WhisperPeer::interpret(unsigned _id, RLP const& _r)
}
void WhisperPeer::sendMessages()
{
if (m_unseen.size())
{
RLPStream amalg;
unsigned msgCount;
unsigned msgCount = 0;
{
Guard l(x_unseen);
msgCount = m_unseen.size();
@ -97,6 +95,8 @@ void WhisperPeer::sendMessages()
}
}
if (msgCount)
{
RLPStream s;
prep(s, MessagesPacket, msgCount).appendRaw(amalg.out(), msgCount);
sealAndSend(s);

Loading…
Cancel
Save