Skip to content

Commit

Permalink
Remove unnecessary listener != nil check
Browse files Browse the repository at this point in the history
  • Loading branch information
Darkren committed Jul 8, 2019
1 parent ced40ef commit 907d170
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions internal/therealssh/channel.go
Original file line number Diff line number Diff line change
Expand Up @@ -318,13 +318,7 @@ func (sshCh *SSHChannel) closeListener() error {
sshCh.listenerMx.Lock()
defer sshCh.listenerMx.Unlock()

if sshCh.listener != nil {
err := sshCh.listener.Close()
sshCh.listener = nil
return err
}

return nil
return sshCh.listener.Close()
}

func debug(format string, v ...interface{}) {
Expand Down

0 comments on commit 907d170

Please sign in to comment.