Skip to content

Commit

Permalink
not always socket.receive fills the buffer argument
Browse files Browse the repository at this point in the history
  • Loading branch information
pinver committed Oct 25, 2019
1 parent 9cd9495 commit 523fa46
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion source/ddb/postgres.d
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,10 @@ class PGStream
{
if (buffer.length > 0)
{
m_socket.receive(buffer);
ptrdiff_t so_far = 0;
do {
so_far += m_socket.receive(buffer[so_far .. $]);
} while (so_far < buffer.length);
}
}
}
Expand Down

0 comments on commit 523fa46

Please sign in to comment.