Index: google_apis/gcm/engine/mcs_client.cc |
diff --git a/google_apis/gcm/engine/mcs_client.cc b/google_apis/gcm/engine/mcs_client.cc |
index a99a333a37e0d694c0a5233ef76012c9d89947d1..fbabda16f12ca9306e7ae3c71c85485667936980 100644 |
--- a/google_apis/gcm/engine/mcs_client.cc |
+++ b/google_apis/gcm/engine/mcs_client.cc |
@@ -770,7 +770,7 @@ void MCSClient::HandleStreamAck(StreamId last_stream_id_received) { |
void MCSClient::HandleSelectiveAck(const PersistentIdList& id_list) { |
std::set<PersistentId> remaining_ids(id_list.begin(), id_list.end()); |
- StreamId last_stream_id_received = -1; |
+ StreamId last_stream_id_received = 0; |
// First check the to_resend_ queue. Acknowledgments are always contiguous, |
// so if there's a pending message that hasn't been acked, all newer messages |
@@ -839,6 +839,10 @@ void MCSClient::HandleSelectiveAck(const PersistentIdList& id_list) { |
to_send_.push_front(to_resend_.back()); |
to_resend_.pop_back(); |
} |
+ base::MessageLoop::current()->PostTask( |
fgorski
2014/07/14 20:59:35
Add comment why this is added.
Nicolas Zea
2014/07/14 21:16:17
The above comment applies to this. We're resending
fgorski
2014/07/15 04:07:58
Fair enough, comment was cut by the diff view I wa
|
+ FROM_HERE, |
+ base::Bind(&MCSClient::MaybeSendMessage, |
+ weak_ptr_factory_.GetWeakPtr())); |
} |
void MCSClient::HandleServerConfirmedReceipt(StreamId device_stream_id) { |