protocol: Really read 4 bytes while checking for cancellation.
authorRichard W.M. Jones <rjones@redhat.com>
Wed, 1 Dec 2010 13:24:23 +0000 (13:24 +0000)
committerRichard W.M. Jones <rjones@redhat.com>
Wed, 1 Dec 2010 13:35:32 +0000 (13:35 +0000)
We've not actually hit this bug in practice, but at least in
theory while checking for cancellation we could read > 0 but
fewer than 4 bytes, which would effectively be discarded and
we would lose synchronization.

Note the socket is non-blocking.

Change the code so that we temporarily set the socket back to
blocking and force the read of all 4 bytes.


No differences found