waalt/loqui — pull request #141 by aesedepece (2013-12-05 13:59:59+00:00)
Title: Enqueue processing of incoming messages. Fixes #127

When you received a lot of messages in a short period of time, each one was being written to memory without waiting for the previous one to be successfully written. This caused all the previous messages to vanish!

The solution was to push every message to a asynchronous queue so that they can be processed in order and they don't overwrite each other.

I've tested it with XMPP, but should work with WhatsApp as well (this is totally connector-independent), so I'm directly merging the PR. Nevertheless, revision is appreciated ;)