fix: stop losing decodes, hanging on exit, and wedging the rig link
Three faults an operator's log finally made visible, plus the interface work that came out of the same session. Reliability: - UDP events were dropped on backpressure without a word. A period hands over twenty-odd decodes at once, and one slow write to the radio was enough to fill the queue — so a decode simply never appeared, and the only detector was the operator comparing the panel with JTDX. The drop is now counted and logged, panadapter spots went to their own goroutine so the radio can no longer hold the decode stream up, and the queue is deep enough for a full period. - The CAT manager waited for its poll loop with a bare <-done. A loop wedged in a serial read then blocked every later restart inside Start, before it could even try to connect: the rig stayed dead, no line was written anywhere, and only killing the process recovered it. The wait is bounded at ten seconds and says what it abandoned and why the next connect may fail. - Shutdown had no logging at all, so a hang left nothing to go on and a process the operator had to kill — which then blocked the restart after an update. Every step is logged, and a watchdog forces the exit if one of them never returns. Auto-call: - A QSO in progress is now held by OpsLog itself rather than inferred from the sender's Status. The moment WSJT-X/JTDX dropped the DX call or the Enable-Tx flag between overs, the exchange looked finished and the next CQ was answered, interleaving two and then three QSOs on one slice. Released on log, on halt, on taking over, and by a watchdog. Cluster console: - Replies to a command were buried under the spot flood; a Replies toggle hides the DX spots, which the list above already shows. - Twelve named command buttons beside the input, configured in Settings -> Cluster; a button with no command is not drawn. - Following the tail is now an explicit switch, and sending a command re-arms it. It used to measure "am I at the bottom" AFTER committing the new lines, so a ten-line reply looked like the operator had scrolled up and was never followed — the one case it exists for. Awards: - An award can name NO field. The matching controls disappear with it and only hand-assigned references count, which is the only thing that can feed a reference like WWBOTA. A test pins that nothing else is scanned. - WWBOTA added to the catalogue with its 31 342 references. Elsewhere: the rotor widget's Stop button acknowledges the press like the direction presets already did, and the docked band map can be switched to fit-to-band from its own header.
This commit is contained in:
+23
-1
@@ -184,7 +184,29 @@ func (m *Manager) stopLocked() {
|
||||
iv.Interrupt()
|
||||
}
|
||||
if done != nil {
|
||||
<-done
|
||||
// Bounded, and loud when it expires.
|
||||
//
|
||||
// This used to be a bare <-done. A poll goroutine wedged in a serial read
|
||||
// then held every caller for ever: each restart attempt blocked inside
|
||||
// Start before it could even try to connect, so the rig stayed dead and
|
||||
// NOTHING was written to the log — the operator saw a CAT link that would
|
||||
// not come back and no reason anywhere. Shutdown blocked on the same wait.
|
||||
//
|
||||
// Ten seconds is far longer than any honest disconnect. Past that the old
|
||||
// poller is not coming back, and carrying on without it — noisily — beats
|
||||
// freezing the application around it. The abandoned goroutine still holds
|
||||
// its port, which is exactly what the log line has to say, because the
|
||||
// next connect will fail because of it.
|
||||
select {
|
||||
case <-done:
|
||||
case <-time.After(10 * time.Second):
|
||||
name := "cat"
|
||||
if b != nil {
|
||||
name = b.Name()
|
||||
}
|
||||
debugLog.Printf("%s: poll loop did not stop within 10s — abandoning it; "+
|
||||
"its port stays open, so the next connect may fail until OpsLog is restarted", name)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user