Skip to content

Commit

Permalink
server: return the actual error when conn panic (#18494) (#18500)
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 138590b commit 1596807
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 @@ -662,6 +662,8 @@ func (cc *clientConn) Run(ctx context.Context) {
zap.String("err", fmt.Sprintf("%v", 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 1596807

Please sign in to comment.