Skip to content

Commit

Permalink
Remove unnecesary error check on cmd wait
Browse files Browse the repository at this point in the history
  • Loading branch information
noly committed Apr 15, 2020
1 parent 4d78a6c commit ea6dede
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions jmx/jmx.go
Original file line number Diff line number Diff line change
Expand Up @@ -237,9 +237,7 @@ func openConnection(config *connectionConfig) (err error) {

go func() {
if err = cmd.Wait(); err != nil {
if err != nil {
cmdErrC <- jmxClientError(fmt.Sprintf("nrjmx error: %s [proc-state: %s]", err, cmd.ProcessState))
}
cmdErrC <- jmxClientError(fmt.Sprintf("nrjmx error: %s [proc-state: %s]", err, cmd.ProcessState))
}

cmd = nil
Expand Down

0 comments on commit ea6dede

Please sign in to comment.