Skip to content

Commit 047c1f9

Browse files
committed
Bugfix in flush queue.
1 parent 46a5642 commit 047c1f9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

websocket-rails-client/channel.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,9 @@ void Channel::failureLauncher(jsonxx::Object data) {
172172

173173
std::queue<Event> Channel::flush_queue() {
174174
while(!this->event_queue.empty()) {
175-
this->dispatcher->triggerEvent(this->event_queue.front());
175+
Event event = this->event_queue.front();
176+
this->dispatcher->triggerEvent(event);
177+
this->event_queue.pop();
176178
}
177179
std::swap(this->event_queue, this->empty);
178180
return this->event_queue;

0 commit comments

Comments
 (0)