summaryrefslogtreecommitdiff
path: root/ipp
diff options
context:
space:
mode:
authorKevin Wallace <kevin@pentabarf.net>2026-04-25 06:13:06 -0700
committerKevin Wallace <kevin@pentabarf.net>2026-04-25 06:13:06 -0700
commit37301efe606906e390d91c5938aa8dc9dfc8be7e (patch)
tree00838b83be90c8d891a6c9682a86816d4c27aa24 /ipp
parentorca ui replica wip (diff)
wait for cvend at startup, only redraw on state changes
Diffstat (limited to 'ipp')
-rw-r--r--ipp/ipp.go12
1 files changed, 7 insertions, 5 deletions
diff --git a/ipp/ipp.go b/ipp/ipp.go
index 391b094..89036b0 100644
--- a/ipp/ipp.go
+++ b/ipp/ipp.go
@@ -149,11 +149,11 @@ func (s *session) handleMsg(bs []byte) (nRead int) {
return
}
}
- var ellipsis string
- if ippLen > 0 {
- ellipsis = "..."
- }
if *Trace {
+ var ellipsis string
+ if ippLen > 0 {
+ ellipsis = "..."
+ }
log.Printf("%s < %s%s%s", s.path, hex.EncodeToString(bs[:7]), ellipsis, hex.EncodeToString(bs[7+ippLen:expectedLen]))
}
if s.handler != nil {
@@ -166,7 +166,9 @@ func (s *session) Close() error {
s.mu.Lock()
defer s.mu.Unlock()
s.closed = true
- return unix.Close(s.fd)
+ fd := s.fd
+ s.fd = -1
+ return unix.Close(fd)
}
func (s *session) Write(bs []byte) (int, error) {