This commit is contained in:
JackDoan
2026-04-15 13:27:55 -05:00
parent 191f7823bf
commit 78b7cd7b28
3 changed files with 4 additions and 2 deletions

View File

@@ -133,7 +133,9 @@ func (c *Control) Stop() {
if err := c.f.Close(); err != nil { if err := c.f.Close(); err != nil {
c.l.WithError(err).Error("Close interface failed") c.l.WithError(err).Error("Close interface failed")
} }
c.stateLock.Lock()
c.state = Stopped c.state = Stopped
c.stateLock.Unlock()
} }
// ShutdownBlock will listen for and block on term and interrupt signals, calling Control.Stop() once signalled // ShutdownBlock will listen for and block on term and interrupt signals, calling Control.Stop() once signalled

View File

@@ -290,7 +290,7 @@ func (f *Interface) listenOut(i int) {
}) })
if err != nil && !f.closed.Load() { if err != nil && !f.closed.Load() {
f.l.WithError(err).Error("Error while reading packet inbound packet, closing") f.l.WithError(err).Error("Error while reading inbound packet, closing")
//TODO: Trigger Control to close //TODO: Trigger Control to close
} }

View File

@@ -284,7 +284,7 @@ func (u *StdConn) ReloadConfig(c *config.C) {
} }
func (u *StdConn) getMemInfo(meminfo *[unix.SK_MEMINFO_VARS]uint32) error { func (u *StdConn) getMemInfo(meminfo *[unix.SK_MEMINFO_VARS]uint32) error {
const vallen uint32 = 4 * unix.SK_MEMINFO_VARS var vallen uint32 = 4 * unix.SK_MEMINFO_VARS
if u.rawConn == nil { if u.rawConn == nil {
return fmt.Errorf("no UDP connection") return fmt.Errorf("no UDP connection")