Skip to content

Commit

Permalink
Added debug to apparent stop channel called early.
Browse files Browse the repository at this point in the history
  • Loading branch information
cheftako committed Jan 10, 2025
1 parent c1a1e09 commit b6ef66a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cmd/agent/app/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,11 @@ func SetupSignalHandler() (drainCh, stopCh <-chan struct{}) {

func handleSignals(signalCh chan os.Signal, drainCh, stopCh chan struct{}) {
s := <-signalCh
fmt.Println("Received first os signal")
klog.V(2).InfoS("Received first signal", "signal", s)
close(drainCh)
s = <-signalCh
fmt.Println("Received second os signal")
klog.V(2).InfoS("Received second signal", "signal", s)
close(stopCh)
}
Expand Down
1 change: 1 addition & 0 deletions tests/framework/proxy_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ func (*InProcessProxyServerRunner) Start(t testing.TB, opts ProxyServerOpts) (Pr
if err := wait.PollImmediateWithContext(ctx, 100*time.Millisecond, wait.ForeverTestTimeout, func(context.Context) (bool, error) {
return checkLiveness(healthAddr), nil
}); err != nil {
fmt.Println("Calling stop channel because server never came up")
close(stopCh)
return nil, fmt.Errorf("server never came up: %v", err)
}
Expand Down

0 comments on commit b6ef66a

Please sign in to comment.