Skip to content

Commit

Permalink
Use correct message type for SUBSCRIBE_DONE
Browse files Browse the repository at this point in the history
  • Loading branch information
mengelbart committed Mar 6, 2024
1 parent d808fe9 commit 03c4e04
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion message.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ const (
announceErrorMessageType messageType = 0x08
unannounceMessageType messageType = 0x09
unsubscribeMessageType messageType = 0x0a
subscribeDoneMessageType messageType = 0x0c
subscribeDoneMessageType messageType = 0x0b
goAwayMessageType messageType = 0x10
clientSetupMessageType messageType = 0x40
serverSetupMessageType messageType = 0x41
Expand Down
12 changes: 6 additions & 6 deletions message_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1023,7 +1023,7 @@ func TestSubscribeDoneMessageAppend(t *testing.T) {
FinalObject: 0,
},
buf: []byte{},
expect: []byte{0x0c, 0x00, 0x00, 0x00, 0x00},
expect: []byte{0x0b, 0x00, 0x00, 0x00, 0x00},
},
{
srm: subscribeDoneMessage{
Expand All @@ -1036,7 +1036,7 @@ func TestSubscribeDoneMessageAppend(t *testing.T) {
},
buf: []byte{},
expect: []byte{
0x0c,
0x0b,
0x00,
0x01,
0x06, 'r', 'e', 'a', 's', 'o', 'n',
Expand All @@ -1053,7 +1053,7 @@ func TestSubscribeDoneMessageAppend(t *testing.T) {
buf: []byte{0x0a, 0x0b, 0x0c, 0x0d},
expect: []byte{
0x0a, 0x0b, 0x0c, 0x0d,
0x0c,
0x0b,
0x11,
0x01,
0x06, 'r', 'e', 'a', 's', 'o', 'n',
Expand All @@ -1070,7 +1070,7 @@ func TestSubscribeDoneMessageAppend(t *testing.T) {
FinalObject: 0,
},
buf: []byte{},
expect: []byte{0x0c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00},
expect: []byte{0x0b, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00},
},
{
srm: subscribeDoneMessage{
Expand All @@ -1083,7 +1083,7 @@ func TestSubscribeDoneMessageAppend(t *testing.T) {
},
buf: []byte{},
expect: []byte{
0x0c,
0x0b,
0x00,
0x01,
0x06, 'r', 'e', 'a', 's', 'o', 'n',
Expand All @@ -1104,7 +1104,7 @@ func TestSubscribeDoneMessageAppend(t *testing.T) {
buf: []byte{0x0a, 0x0b, 0x0c, 0x0d},
expect: []byte{
0x0a, 0x0b, 0x0c, 0x0d,
0x0c,
0x0b,
0x11,
0x01,
0x06, 'r', 'e', 'a', 's', 'o', 'n',
Expand Down

0 comments on commit 03c4e04

Please sign in to comment.