Skip to content

Commit

Permalink
small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
rutaka-n committed Apr 1, 2024
1 parent 428ed23 commit f5cff83
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions cmd/commands/proxy_command.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ func (pc *ProxyCommand) Run() error {
ctx, cancel := signal.NotifyContext(context.Background(), syscall.SIGTERM, syscall.SIGQUIT, syscall.SIGINT)
defer cancel()

reloadSigChan := make(chan os.Signal)
reloadSigChan := make(chan os.Signal, 1)
signal.Notify(reloadSigChan, syscall.SIGUSR1)

serverErr := make(chan error)
Expand Down Expand Up @@ -116,5 +116,4 @@ func (pc *ProxyCommand) Run() error {
os.Exit(1)
}
}
return nil
}
4 changes: 2 additions & 2 deletions proxy/proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ type Proxy struct {
Secret []byte
ServiceName string
server http.Server
InvalidatedTokens gs.Set[string]
InvalidatedTokens *gs.Set[string]
}

// New returns Proxy initialized with addr, and server timeouts
Expand Down Expand Up @@ -60,7 +60,7 @@ func (p *Proxy) SetServices(services []config.Service) {
func (p *Proxy) SetInvalidatedTokens(tokens []string) {
set := gs.New[string]()
set.Add(tokens...)
p.InvalidatedTokens = set
p.InvalidatedTokens = &set
}

// ListenAndServe binds port and starts listening
Expand Down

0 comments on commit f5cff83

Please sign in to comment.