Skip to content

Commit

Permalink
fix(daemon): client not closed when Execute is done
Browse files Browse the repository at this point in the history
  • Loading branch information
nedpals committed Dec 29, 2023
1 parent 3c2a0d9 commit 64031ba
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
1 change: 1 addition & 0 deletions server/daemon/daemon.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,6 @@ func Execute(clientType types.ClientType, execFn func(client *Client) error) err
return err
}
}
defer client.Close()
return execFn(client)
}
5 changes: 1 addition & 4 deletions server/monitor.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,7 @@ func monitorProcess(workingDir string, daemonClient *daemonClient.Client, prog s
return errProcessor.numErrors, 1, err
}

defer func() {
errProcessor.Flush()
errProcessor.daemonClient.Close()
}()
defer errProcessor.Flush()

fmt.Printf("> listening to %s %s...\n", prog, strings.Join(args, " "))
progCmd := exec.Command(prog, args...)
Expand Down

0 comments on commit 64031ba

Please sign in to comment.