Skip to content

Commit

Permalink
fixes #1019 (#1020)
Browse files Browse the repository at this point in the history
this commit fixes #1019
  • Loading branch information
ramezhanna committed Sep 30, 2021
1 parent 2026a40 commit 94abc75
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions builtin/bins/dkron-executor-nats/nats.go
Expand Up @@ -73,6 +73,11 @@ func (s *Nats) ExecuteImpl(args *dktypes.ExecuteRequest) ([]byte, error) {
if debug {
log.Printf("request %#v\n\n", nc)
}

if nc.IsConnected() {
defer nc.Flush()
defer nc.Close()
}

return output.Bytes(), nil
}

0 comments on commit 94abc75

Please sign in to comment.