Skip to content

Commit

Permalink
Keep stream and logs in sync for detecting closed pipe
Browse files Browse the repository at this point in the history
  • Loading branch information
dadgar committed May 9, 2018
1 parent 2640ef3 commit 51440e2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion client/fs_endpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,8 @@ func (f *FileSystem) stream(conn io.ReadWriteCloser) {
go func() {
for {
if _, err := conn.Read(nil); err != nil {
if err == io.EOF {
if err == io.EOF || err == io.ErrClosedPipe {
// One end of the pipe was explicitly closed, exit cleanly
cancel()
return
}
Expand Down

0 comments on commit 51440e2

Please sign in to comment.