(ctx context.Context, reqs <-chan tunnelssh.SSHRequest)
| 409 | } |
| 410 | |
| 411 | func handleRequests(ctx context.Context, reqs <-chan tunnelssh.SSHRequest) { |
| 412 | for { |
| 413 | select { |
| 414 | case <-ctx.Done(): |
| 415 | return |
| 416 | case req, ok := <-reqs: |
| 417 | if !ok { |
| 418 | return |
| 419 | } |
| 420 | |
| 421 | if req.Type() == "RefreshPorts" { |
| 422 | _ = req.Reply(true, nil) |
| 423 | continue |
| 424 | } else { |
| 425 | _ = req.Reply(false, nil) |
| 426 | } |
| 427 | } |
| 428 | } |
| 429 | } |
| 430 | |
| 431 | func awaitError(ctx context.Context, errc <-chan error) error { |
| 432 | select { |
no test coverage detected