Skip to content

Commit

Permalink
backport of commit f12c128 (#21347)
Browse files Browse the repository at this point in the history
Co-authored-by: Nick Cabatoff <ncabatoff@hashicorp.com>
  • Loading branch information
1 parent 63035d5 commit a212330
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions changelog/21342.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:bug
core: Don't exit just because we think there's a potential deadlock.
```
4 changes: 4 additions & 0 deletions command/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ import (
"github.com/mitchellh/go-testing-interface"
"github.com/pkg/errors"
"github.com/posener/complete"
"github.com/sasha-s/go-deadlock"
"go.uber.org/atomic"
"golang.org/x/net/http/httpproxy"
"google.golang.org/grpc/grpclog"
Expand Down Expand Up @@ -930,6 +931,9 @@ func (c *ServerCommand) Run(args []string) int {
return 1
}

// Don't exit just because we saw a potential deadlock.
deadlock.Opts.OnPotentialDeadlock = func() {}

c.logGate = gatedwriter.NewWriter(os.Stderr)
c.logWriter = c.logGate

Expand Down

0 comments on commit a212330

Please sign in to comment.