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