npgsql/Npgsql — pull request #107 by udoliess (2013-11-28 17:02:20+00:00)
Title: Multiple notify fix

Hello Francisco,

this is a fix for bug [#1011374] . The problem was the BufferedStream on top of network stream: it reads data into buffer out of network stream and afterwards there is no data available for "Socket.Poll(...)" (NpgsqlConnector.cs line 1172, NpgsqlState.cs line 397, NpgsqlState.cs line 401). A network stream is already buffered in memory so the solution ist to bypass buffer for read operations and to use buffer only for write operations on the stream. BufferedStream calls Flush() automaticly on switching between reads and writes. Without this automatic flush we need to call Flush() after each completly written command.

Udo