Add error context to Session.Close
This commit is contained in:
parent
5e9382e8b4
commit
5f6b3a5eee
1 changed files with 3 additions and 3 deletions
|
|
@ -17,12 +17,12 @@ type Session struct {
|
|||
func (s *Session) Close() error {
|
||||
// Closing the RPC conn closes the underlying stream (SSH)
|
||||
// So we only need to close once
|
||||
err := s.rpc.Close()
|
||||
if err != nil {
|
||||
if err := s.rpc.Close(); err != nil {
|
||||
s.ssh.Close() // close SSH and ignore error
|
||||
return fmt.Errorf("error while closing Live Share session: %w", err)
|
||||
}
|
||||
|
||||
return err
|
||||
return nil
|
||||
}
|
||||
|
||||
// Port describes a port exposed by the container.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue