1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2025-03-27 21:39:14 +02:00
David Steele 7967c750d8
Fix protocol error on short read of remote file.
If a remote file read was stopped before the read was complete or if an error occurred in the middle of the read then the protocol would end up in a bad state and produce this error:

ProtocolError: client state is 'data-get' but expected 'idle'

Prevent this by reading the rest of the file on close() or free() to leave the protocol in an idle state for the next command.

This was a possible issue for bundling because the amount to read is known in advance and therefore eof may not be reached. However, I was only able to reproduce this issue with unreleased code.

On error this issue would cause the original error to be lost. The process may still fail with this fix (if the error comes from another source) but hopefully we'll get better information about the original error.
2022-10-18 11:09:00 +13:00
..
2022-09-19 10:08:10 -07:00
2022-05-11 10:39:31 -04:00
2022-09-08 18:36:03 -06:00
2022-09-08 18:36:03 -06:00
2022-08-24 10:52:33 -04:00