(ctx context.Context)
| 186 | } |
| 187 | |
| 188 | func (c *Conn) setupReadTimeout(ctx context.Context) bool { |
| 189 | if ctx.Done() == nil { |
| 190 | return false |
| 191 | } |
| 192 | |
| 193 | stop := context.AfterFunc(ctx, func() { |
| 194 | c.clearReadTimeout() |
| 195 | c.close() |
| 196 | }) |
| 197 | swapTimeoutStop(&c.readTimeoutStop, &stop) |
| 198 | return true |
| 199 | } |
| 200 | |
| 201 | func (c *Conn) clearReadTimeout() { |
| 202 | swapTimeoutStop(&c.readTimeoutStop, nil) |
no test coverage detected