mirror of
https://github.com/strukturag/nextcloud-spreed-signaling
synced 2024-05-02 05:52:44 +02:00
Stopping the static proxy config should unregister from DNS monitor.
This commit is contained in:
parent
7e613f831b
commit
29b0b06f6d
|
@ -151,6 +151,10 @@ func (p *proxyConfigStatic) Start() error {
|
|||
|
||||
if p.dnsDiscovery {
|
||||
for u, ips := range p.connectionsMap {
|
||||
if ips.entry != nil {
|
||||
continue
|
||||
}
|
||||
|
||||
entry, err := p.dnsMonitor.Add(u, p.onLookup)
|
||||
if err != nil {
|
||||
return err
|
||||
|
@ -170,6 +174,19 @@ func (p *proxyConfigStatic) Start() error {
|
|||
}
|
||||
|
||||
func (p *proxyConfigStatic) Stop() {
|
||||
p.mu.Lock()
|
||||
defer p.mu.Unlock()
|
||||
|
||||
if p.dnsDiscovery {
|
||||
for _, ips := range p.connectionsMap {
|
||||
if ips.entry == nil {
|
||||
continue
|
||||
}
|
||||
|
||||
p.dnsMonitor.Remove(ips.entry)
|
||||
ips.entry = nil
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func (p *proxyConfigStatic) Reload(config *goconf.ConfigFile) error {
|
||||
|
|
Loading…
Reference in a new issue