chore: release v0.26.2
This commit is contained in:
@@ -2163,6 +2163,34 @@ func (f *Flex) startMeters(conn net.Conn) {
|
||||
debugLog.Printf("Flex: meters UDP local=:%d punch→%s", port, raddr)
|
||||
go f.udpReader(uc)
|
||||
go f.udpKeepalive(uc, raddr)
|
||||
go f.udpWatchdog(uc)
|
||||
}
|
||||
|
||||
// udpWatchdog says so when the meter stream never arrives.
|
||||
//
|
||||
// The meters come over VITA-49 on a UDP socket the radio sends TO US; the TCP
|
||||
// side can be perfectly healthy — handshake, slices, spots, everything — while
|
||||
// not one datagram gets through. On Windows that is almost always the firewall
|
||||
// refusing inbound UDP for a program it has not been asked about, and the only
|
||||
// symptom is meters that stay at zero. Nothing said so: an operator saw a
|
||||
// connected radio with dead meters and no reason anywhere.
|
||||
//
|
||||
// Five seconds is far longer than the stream's own 40 frames a second needs.
|
||||
func (f *Flex) udpWatchdog(uc *net.UDPConn) {
|
||||
time.Sleep(5 * time.Second)
|
||||
f.mu.Lock()
|
||||
cur, seen := f.udpConn, f.vitaSeen
|
||||
port := 0
|
||||
if uc.LocalAddr() != nil {
|
||||
port = uc.LocalAddr().(*net.UDPAddr).Port
|
||||
}
|
||||
f.mu.Unlock()
|
||||
if cur != uc || seen > 0 {
|
||||
return // reconnected in the meantime, or the stream is flowing
|
||||
}
|
||||
debugLog.Printf("Flex: NO meter data after 5s — the radio's VITA-49 stream is not reaching UDP port %d. "+
|
||||
"The TCP link is fine, so this is almost always a firewall: allow OpsLog.exe inbound UDP "+
|
||||
"(Windows Defender Firewall → Allow an app), or open port %d for %s", port, port, f.host)
|
||||
}
|
||||
|
||||
func (f *Flex) udpReader(uc *net.UDPConn) {
|
||||
|
||||
Reference in New Issue
Block a user