MCPcopy
hub / github.com/evilsocket/opensnitch / StopCheckingRules

Method StopCheckingRules

daemon/firewall/common/common.go:166–182  ·  view source on GitHub ↗

StopCheckingRules stops checking if firewall rules are loaded.

()

Source from the content-addressed store, hash-verified

164
165// StopCheckingRules stops checking if firewall rules are loaded.
166func (c *Common) StopCheckingRules() {
167 c.Lock()
168 defer c.Unlock()
169
170 if c.RulesChecker != nil {
171 select {
172 case c.stopChecker <- struct{}{}:
173 close(c.stopChecker)
174 case <-time.After(5 * time.Millisecond):
175 // We should not arrive here
176 log.Error("StopCheckingRules: timed out stopping monitor rules")
177 }
178
179 c.RulesChecker.Stop()
180 c.RulesChecker = nil
181 }
182}
183
184func (c *Common) reloadCallback(callback func()) {
185 callback()

Callers 4

StopMethod · 0.80
DisableInterceptionMethod · 0.80
StopMethod · 0.80
DisableInterceptionMethod · 0.80

Calls 3

LockMethod · 0.80
UnlockMethod · 0.80
StopMethod · 0.65

Tested by

no test coverage detected