forked from TrueCloudLab/restic
Add nil-receiver awareness to all Reader/Writer
This commit is contained in:
parent
dbc41bb805
commit
98dc811536
5 changed files with 20 additions and 3 deletions
|
@ -554,6 +554,10 @@ func (r *SFTP) ID() string {
|
|||
|
||||
// Close closes the sftp connection and terminates the underlying command.
|
||||
func (s *SFTP) Close() error {
|
||||
if s == nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
s.c.Close()
|
||||
// TODO: add timeout after which the process is killed
|
||||
return s.cmd.Wait()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue