Browse Source

Clean dangling agent socket

aeris 1 month ago
parent
commit
8568e627e1
1 changed files with 1 additions and 0 deletions
  1. 1
    0
      agent.go

+ 1
- 0
agent.go View File

@@ -85,6 +85,7 @@ func (a *Agent) start() {
85 85
 	fmt.Fprintf(os.Stderr, "Start new agent for identity %s\n", a.Identity.Name)
86 86
 	sock := a.Path + ".sock"
87 87
 
88
+	syscall.Unlink(sock)
88 89
 	cmd := exec.Command("ssh-agent", "-a", sock)
89 90
 	o, e, err := capture3(cmd)
90 91
 	if err != nil {

Loading…
Cancel
Save