mirror of
https://github.com/zrepl/zrepl.git
synced 2025-06-20 09:47:50 +02:00
sshbytestream: exited command always returns io.EOF
This commit is contained in:
parent
82beea94d5
commit
cb37470010
@ -116,7 +116,7 @@ func Outgoing(remote SSHTransport) (conn io.ReadWriteCloser, err error) {
|
|||||||
WaitErr: err,
|
WaitErr: err,
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
f.SSHCommandError = nil
|
f.SSHCommandError = io.EOF
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
|
|
||||||
@ -139,10 +139,8 @@ func (f *ForkedSSHReadWriteCloser) Read(p []byte) (n int, err error) {
|
|||||||
if n, err = f.RemoteStdout.Read(p); err == io.EOF {
|
if n, err = f.RemoteStdout.Read(p); err == io.EOF {
|
||||||
// the ssh command has exited, but we need to wait for post-portem to finish
|
// the ssh command has exited, but we need to wait for post-portem to finish
|
||||||
f.exitWaitGroup.Wait()
|
f.exitWaitGroup.Wait()
|
||||||
if f.SSHCommandError != nil {
|
|
||||||
err = f.SSHCommandError
|
err = f.SSHCommandError
|
||||||
}
|
}
|
||||||
}
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -153,10 +151,8 @@ func (f *ForkedSSHReadWriteCloser) Write(p []byte) (n int, err error) {
|
|||||||
if n, err = f.RemoteStdin.Write(p); err == io.EOF {
|
if n, err = f.RemoteStdin.Write(p); err == io.EOF {
|
||||||
// the ssh command has exited, but we need to wait for post-portem to finish
|
// the ssh command has exited, but we need to wait for post-portem to finish
|
||||||
f.exitWaitGroup.Wait()
|
f.exitWaitGroup.Wait()
|
||||||
if f.SSHCommandError != nil {
|
|
||||||
err = f.SSHCommandError
|
err = f.SSHCommandError
|
||||||
}
|
}
|
||||||
}
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user