Skip to content

Commit

Permalink
server: return the actual error when conn panic (#18494)
Browse files Browse the repository at this point in the history
Co-authored-by: ti-srebot <66930949+ti-srebot@users.noreply.github.com>
  • Loading branch information
XuHuaiyu and ti-srebot authored Jul 13, 2020
1 parent b13fdb7 commit 165bdfd
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 @@ -669,6 +669,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 165bdfd

Please sign in to comment.