Skip to content
This repository has been archived by the owner on Dec 30, 2024. It is now read-only.

Commit

Permalink
fix issue #44
Browse files Browse the repository at this point in the history
  • Loading branch information
rdoorn committed Mar 15, 2018
1 parent cbc4aff commit e9e38c7
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions internal/core/proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,21 +100,25 @@ func (manager *Manager) InitializeProxies() {
existingProxy.ReadTimeout != pool.Listener.ReadTimeout ||
existingProxy.WriteTimeout != pool.Listener.WriteTimeout ||
existingProxy.OCSPStapling != pool.Listener.OCSPStapling ||
!reflect.DeepEqual(existingTLS.CipherSuites, newTLS.CipherSuites) ||
!reflect.DeepEqual(existingTLS.CurvePreferences, newTLS.CurvePreferences) ||
!reflect.DeepEqual(existingTLS.Certificates, newTLS.Certificates)

// Has listener changed?
if listenerChanged {
// Interface changes, we need to restart the proxy, lets stop it
certchange := !reflect.DeepEqual(existingTLS.Certificates, newTLS.Certificates)
log.WithField("pool", poolname).Debugf("listener changed - mode:%t ip:%t port:%t, maxcon:%t readtimeout:%t writetimeout:%t ocsp:%t cert:%t",
log.WithField("pool", poolname).Debugf("listener changed - mode:%t ip:%t port:%t, maxcon:%t readtimeout:%t writetimeout:%t ocsp:%t cert:%t cypher:%t curve:%t",
existingProxy.ListenerMode != pool.Listener.Mode,
existingProxy.IP != pool.Listener.IP,
existingProxy.Port != pool.Listener.Port,
existingProxy.MaxConnections != pool.Listener.MaxConnections,
existingProxy.ReadTimeout != pool.Listener.ReadTimeout,
existingProxy.WriteTimeout != pool.Listener.WriteTimeout,
existingProxy.OCSPStapling != pool.Listener.OCSPStapling,
certchange)
certchange,
!reflect.DeepEqual(existingTLS.CipherSuites, newTLS.CipherSuites),
!reflect.DeepEqual(existingTLS.CurvePreferences, newTLS.CurvePreferences))
log.WithField("pool", poolname).Info("Restarting existing proxy for new listener settings")
existingProxy.Stop()
existingProxy.SetListener(pool.Listener.Mode, pool.Listener.IP, pool.Listener.Port, pool.Listener.MaxConnections, newTLS, pool.Listener.ReadTimeout, pool.Listener.WriteTimeout, pool.Listener.HTTPProto, pool.Listener.OCSPStapling)
Expand Down

0 comments on commit e9e38c7

Please sign in to comment.