Skip to content

Commit

Permalink
Make ssh sockets close on exit
Browse files Browse the repository at this point in the history
  • Loading branch information
quexten committed Feb 4, 2024
1 parent f5c2090 commit 4afd6ef
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions agent/ssh/sshsocketunix.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ func (v SSHAgentServer) Serve() {
if err != nil {
panic(err)
}
defer listener.Close()

log.Info("SSH Agent listening on %s", path)

Expand Down
1 change: 1 addition & 0 deletions agent/unixsocketagent.go
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,7 @@ func StartUnixAgent(path string, runtimeConfig config.RuntimeConfig) error {
println("listen error", err.Error())
return err
}
defer l.Close()
log.Info("Agent listening on %s...", path)

go func() {
Expand Down

0 comments on commit 4afd6ef

Please sign in to comment.