add consolenotifier for peripheral system alerts

This commit is contained in:
legop3
2026-09-08 21:46:10 -04:00
parent 3859806fca
commit 038ae0f45a
19 changed files with 299 additions and 25 deletions
+5 -2
View File
@@ -389,6 +389,7 @@ type scriptedConnection struct {
reads chan []byte
timeoutsBeforeRead int
pendingRead []byte
closeOnce sync.Once
}
func newScriptedConnection(responses ...[]byte) *scriptedConnection {
@@ -432,7 +433,9 @@ func (connection *scriptedConnection) Write(data []byte) (int, error) {
}
func (connection *scriptedConnection) Close() error {
_ = connection.recordingConnection.Close()
close(connection.reads)
connection.closeOnce.Do(func() {
_ = connection.recordingConnection.Close()
close(connection.reads)
})
return nil
}