()
| 436 | } |
| 437 | |
| 438 | func (s *sharedBackendConn) Retain() *sharedBackendConn { |
| 439 | if s == nil { |
| 440 | return nil |
| 441 | } |
| 442 | if s.refcnt <= 0 { |
| 443 | log.Panicf("shared backend conn has been closed") |
| 444 | } else { |
| 445 | s.refcnt++ |
| 446 | } |
| 447 | return s |
| 448 | } |
| 449 | |
| 450 | func (s *sharedBackendConn) KeepAlive() { |
| 451 | if s == nil { |