Skip to content

Commit 8adc129

Browse files
committed
Fix clearing of m_msg
We should only clear it when done sending all.
1 parent a8143b2 commit 8adc129

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/peer.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,9 +189,10 @@ void PeerConnection::send(bool start_read) {
189189
self->m_msg = self->m_send_queue.front();
190190
self->m_send_queue.pop_front();
191191
self->send();
192+
} else {
193+
// Indicates that all sending is done
194+
self->m_msg.clear();
192195
}
193-
// Indicates that all sending is done
194-
self->m_msg.clear();
195196
});
196197
}
197198

0 commit comments

Comments
 (0)