Browse Source
If the push client has requested side-band support the server can signal a fatal error parsing the pack using the error channel (3) and then hang up. This may cause the PackWriter to fail to write to data onto the network socket, which throws a misleading error back up to the application and the user. During a write failure poll the input to see if the side band system can parse out an error message off channel 3. This should be fast as there will either be an error present in the buffer, or the remote will also have hung-up on the side band channel. In the case of a hang-up just rethrow the original IOException as its a network error. This roughly matches what C git does; once commands are sent and the packer is started a new thread runs in the background to decode any possible server error during unpacking on the remote peer Change-Id: Idb37a4a122a565ec4b59130e08c27d963ba09395stable-4.5
Shawn Pearce
8 years ago
1 changed files with 51 additions and 1 deletions
Loading…
Reference in new issue