lib: ignore messages when queue is empty
Merge pull request #5 from indutny/fix-empty-queue

lib: ignore messages when queue is empty