(req *request)
| 363 | } |
| 364 | |
| 365 | func (b *MockBroker) defaultRequestHandler(req *request) (res encoderWithHeader) { |
| 366 | select { |
| 367 | case res, ok := <-b.expectations: |
| 368 | if !ok { |
| 369 | return nil |
| 370 | } |
| 371 | // always match the response version to the request version |
| 372 | if pb, ok := res.(protocolBody); ok { |
| 373 | pb.setVersion(req.body.version()) |
| 374 | } |
| 375 | return res |
| 376 | case <-time.After(expectationTimeout): |
| 377 | return nil |
| 378 | } |
| 379 | } |
| 380 | |
| 381 | func isConnectionClosedError(err error) bool { |
| 382 | var result bool |
nothing calls this directly
no test coverage detected