MCPcopy Index your code
hub / github.com/cli/cli / handleRequests

Function handleRequests

internal/codespaces/connection/tunnels_api_server_mock.go:411–429  ·  view source on GitHub ↗
(ctx context.Context, reqs <-chan tunnelssh.SSHRequest)

Source from the content-addressed store, hash-verified

409}
410
411func 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
431func awaitError(ctx context.Context, errc <-chan error) error {
432 select {

Callers 1

makeConnectionFunction · 0.85

Calls 3

ReplyMethod · 0.80
DoneMethod · 0.65
TypeMethod · 0.45

Tested by

no test coverage detected