INNER CODE UNIT · Go

delay

daptin/daptin · main.go:629

	delay := time.NewTimer(*shutdownReadinessDelay)
	select {
	case <-delay.C:
	case <-shutdownCtx.Done():
		delay.Stop()
	}

	serverShutdownErrors := make(chan error, len(httpServers))
	for _, httpServer := range httpServers {
		go func(srv *http.Server) { serverShutdownErrors <- srv.Shutdown(shutdownCtx) }(httpServer)
	}
	for range httpServers {
		if shutdownErr := <-serverShutdownErrors; shutdownErr != nil {
			lifecycleErr = errors.Join(lifecycleErr, shutdownErr)
		}
	}
	if runtimeErr := runtimeInstance.Drain(shutdownCtx); runtimeErr != nil {
		lifecycleErr = errors.Join(lifecycleErr, runtimeErr)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…