pico
created pr with
105.1
added 105.2
1: 603ca6e = 1: 603ca6e chore(pubsub): add more tests
2: 501c042 ! 2: 17e00b2 feat(pubsub): round robin
added 105.3
1: 603ca6e = 1: 603ca6e chore(pubsub): add more tests
2: 17e00b2 = 2: 17e00b2 feat(pubsub): round robin
-: ------- > 3: e3136bd fix(pubsub): check for eof before processing and skip empty byte reads
-: ------- > 4: 9a6d19e fix: rr
-: ------- > 5: 5b3f3a1 fix: sending 0 byte read
added 105.4
1: 603ca6e = 1: 603ca6e chore(pubsub): add more tests
2: 17e00b2 = 2: 17e00b2 feat(pubsub): round robin
3: e3136bd = 3: e3136bd fix(pubsub): check for eof before processing and skip empty byte reads
4: 9a6d19e = 4: 9a6d19e fix: rr
5: 5b3f3a1 = 5: 5b3f3a1 fix: sending 0 byte read
-: ------- > 6: 4fff471 refactor: fixes
-: ------- > 7: d0dfc85 chore: SetDispatch on Broker
changed status to
accepted
cmds
checkout latest patchset:
ssh pr.pico.sh print 105 | git am -3checkout any patchset in a patch request:
ssh pr.pico.sh print 105.[rev] | git am -3add changes to patch request:
git format-patch main --stdout | ssh pr.pico.sh pr add 105set PR to open (enables RSS notifications):
ssh pr.pico.sh pr open 105set PR to draft (stops RSS notifications):
ssh pr.pico.sh pr draft 105
Patchset
105.3
chore(pubsub): add more tests
Eric Bower
feat(pubsub): round robin
2026-01-25T16:38:25ZEric Bower
→ fix(pubsub): check for eof before processing and skip empty byte reads
2026-01-25T16:38:25ZEric Bower
fix: rr
2026-01-28T01:42:34ZEric Bower
fix: sending 0 byte read
2026-01-28T01:50:04ZEric Bower
2026-01-28T02:50:25Z
fix(pubsub): check for eof before processing and skip empty byte reads
Eric Bower
2026-01-28T01:42:34ZSemantic diff summary
0 added,
1 modified,
0 signature changed,
0 removed
across 1 analyzed file
+15
-8
pkg/pubsub/broker.go
#
| ... | ... | @@ -104,6 +104,21 @@ func (b *BaseBroker) Connect(client *Client, channels []*Channel) (error, error) | |
| 104 | 104 | for { | |
| 105 | 105 | data := make([]byte, 32*1024) | |
| 106 | 106 | n, err := client.ReadWriter.Read(data) | |
| 107 | + | ||
| 108 | + | // Check for EOF before processing | |
| 109 | + | if err != nil { | |
| 110 | + | if errors.Is(err, io.EOF) { | |
| 111 | + | return | |
| 112 | + | } | |
| 113 | + | inputErr = err | |
| 114 | + | return | |
| 115 | + | } | |
| 116 | + | ||
| 117 | + | // Skip empty reads | |
| 118 | + | if n == 0 { | |
| 119 | + | continue | |
| 120 | + | } | |
| 121 | + | ||
| 107 | 122 | data = data[:n] | |
| 108 | 123 | ||
| 109 | 124 | channelMessage := ChannelMessage{ |