emitLogLocked sends to the backend log channel while the caller already holds wg.mu.
(severity logSeverity, message string)
| 45 | |
| 46 | // emitLogLocked sends to the backend log channel while the caller already holds wg.mu. |
| 47 | func (wg *WireGuard) emitLogLocked(severity logSeverity, message string) { |
| 48 | if wg.logChan == nil { |
| 49 | return |
| 50 | } |
| 51 | |
| 52 | select { |
| 53 | case wg.logChan <- formatWireGuardLogLine(severity, message): |
| 54 | default: |
| 55 | } |
| 56 | } |
no test coverage detected