Skip to content

Commit

Permalink
server: simplify conn.go recover. (pingcap#2827)
Browse files Browse the repository at this point in the history
The runtime.Stack never return out of range size.
  • Loading branch information
coocood authored and ngaut committed Mar 15, 2017
1 parent cca10ba commit 14da0e9
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions server/conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -332,12 +332,6 @@ func (cc *clientConn) Run() {
if r != nil {
buf := make([]byte, size)
stackSize := runtime.Stack(buf, false)
if stackSize > size {
stackSize = size
}
if stackSize < 0 {
stackSize = 0
}
buf = buf[:stackSize]
log.Errorf("lastCmd %s, %v, %s", cc.lastCmd, r, buf)
}
Expand Down

0 comments on commit 14da0e9

Please sign in to comment.