Skip to content

Commit

Permalink
Don't exit just because we think there was a possible deadlock (#21342)
Browse files Browse the repository at this point in the history
  • Loading branch information
ncabatoff authored Jun 19, 2023
1 parent 8af6780 commit f12c128
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 @@ -63,6 +63,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 @@ -1001,6 +1002,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 f12c128

Please sign in to comment.