session: sends CLOSE and terminates on EOSE if query

This commit is contained in:
Jay
2026-05-17 11:45:23 -04:00
parent a6922182d6
commit 5a797c11d7
2 changed files with 44 additions and 4 deletions
+6
View File
@@ -6,6 +6,7 @@ import (
"encoding/base32"
"fmt"
"git.wisehodl.dev/jay/go-mana-component"
"git.wisehodl.dev/jay/go-roots-ws"
"log/slog"
"sync"
"time"
@@ -237,6 +238,11 @@ func (s *session) run() {
s.terminate(termExternal)
return
case <-s.eose:
if s.closeOnEOSE {
s.send(envelope.EncloseClose(s.id))
s.terminate(termCloseSent)
return
}
}
}
}