Skip to content

Commit

Permalink
server: return the actual error when conn panic (#18494) (#18498)
Browse files Browse the repository at this point in the history
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
  • Loading branch information
ti-srebot authored Jul 13, 2020
1 parent 8062359 commit 2aade69
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions server/conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -652,6 +652,8 @@ func (cc *clientConn) Run(ctx context.Context) {
zap.Reflect("err", r),
zap.String("stack", string(buf)),
)
err := cc.writeError(errors.New(fmt.Sprintf("%v", r)))
terror.Log(err)
metrics.PanicCounter.WithLabelValues(metrics.LabelSession).Inc()
}
if atomic.LoadInt32(&cc.status) != connStatusShutdown {
Expand Down

0 comments on commit 2aade69

Please sign in to comment.