Cover WebSocket session lifecycle (result channels, SNMP batch flushing, heartbeats, restart), MikroTik TLS TOFU verification mismatch, worker pool exhaustion, plaintext WebSocket rejection, HTTP/TCP/DNS check execution, IPv4 fallback, and customer network edge cases. Make heartbeat intervals and toWebSocketURL exit injectable for testing.
sync.Once contains sync.noCopy and cannot be assigned by value. Reset with a fresh sync.Once{} in defer instead of save/restore. Also gitignore known_hosts.json runtime data.