franciscojunior/Npgsql2 — pull request #46 by glenebob (2013-08-24 20:35:02+00:00)
Title: Fix bug where multiple async notifications not delivered properly

Hi Francisco,

Here's what I did to fix the multiple async notification bug, for discussion.

It might actually be better to roll our own buffered stream, or do what we talked about with binary readers, where we can peek at the buffer. Then if we peek and there's data, go ahead and read notifications, else do the Poll call.

The way I did it here was quite simple, until I ran into the timeout bug.

-Glen