"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "pkg/server/server.go" between
traefik-v2.3.2.src.tar.gz and traefik-v2.3.3.src.tar.gz

About: Traefik is a cloud native edge router, a reverse proxy and load balancer for HTTP and TCP-based applications.

server.go  (traefik-v2.3.2.src):server.go  (traefik-v2.3.3.src)
package server package server
import ( import (
"context" "context"
"errors"
"os" "os"
"os/signal" "os/signal"
"time" "time"
"github.com/traefik/traefik/v2/pkg/log" "github.com/traefik/traefik/v2/pkg/log"
"github.com/traefik/traefik/v2/pkg/metrics" "github.com/traefik/traefik/v2/pkg/metrics"
"github.com/traefik/traefik/v2/pkg/middlewares/accesslog" "github.com/traefik/traefik/v2/pkg/middlewares/accesslog"
"github.com/traefik/traefik/v2/pkg/safe" "github.com/traefik/traefik/v2/pkg/safe"
"github.com/traefik/traefik/v2/pkg/server/middleware" "github.com/traefik/traefik/v2/pkg/server/middleware"
) )
skipping to change at line 88 skipping to change at line 89
s.stopChan <- true s.stopChan <- true
} }
// Close destroys the server. // Close destroys the server.
func (s *Server) Close() { func (s *Server) Close() {
ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second) ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second)
go func(ctx context.Context) { go func(ctx context.Context) {
<-ctx.Done() <-ctx.Done()
if ctx.Err() == context.Canceled { if errors.Is(ctx.Err(), context.Canceled) {
return return
} else if ctx.Err() == context.DeadlineExceeded { } else if errors.Is(ctx.Err(), context.DeadlineExceeded) {
panic("Timeout while stopping traefik, killing instance ✝ ") panic("Timeout while stopping traefik, killing instance ✝ ")
} }
}(ctx) }(ctx)
stopMetricsClients() stopMetricsClients()
s.routinesPool.Stop() s.routinesPool.Stop()
signal.Stop(s.signals) signal.Stop(s.signals)
close(s.signals) close(s.signals)
 End of changes. 3 change blocks. 
2 lines changed or deleted 3 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)