MCPcopy Create free account
hub / github.com/cli/cli / handleRequests

Function handleRequests

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

Source from the content-addressed store, hash-verified

407}
408
409func 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
429func awaitError(ctx context.Context, errc <-chan error) error {
430 select {

Callers 1

makeConnectionFunction · 0.85

Calls 2

ReplyMethod · 0.80
TypeMethod · 0.45

Tested by

no test coverage detected