()
| 105 | } |
| 106 | |
| 107 | func (t *TCPClient) invokePlannedDisconnect() { |
| 108 | t.lock.RLock() |
| 109 | defer t.lock.RUnlock() |
| 110 | if t.plannedDisconnect != nil && t.connected { |
| 111 | go t.plannedDisconnect(t) |
| 112 | t.connected = false |
| 113 | } |
| 114 | } |
| 115 | |
| 116 | func (t *TCPClient) invokeUnexpectedDisconnect(err error) { |
| 117 | t.lock.RLock() |
no test coverage detected