Skip to content

Commit 0a9828d

Browse files
Noam Preilritchiecarroll
authored andcommitted
validate connections properly when version is 2
1 parent 2711842 commit 0a9828d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sttp/transport/DataSubscriber.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -823,7 +823,7 @@ func (ds *DataSubscriber) readPayloadHeader(bytesTransferred int, err error) {
823823
packetSize := binary.BigEndian.Uint32(ds.readBuffer)
824824

825825
if ds.validated.IsNotSet() {
826-
if ds.Version > 2 {
826+
if ds.Version >= 2 {
827827
// We need to check for a valid initial payload header size before attempting to resize
828828
// the payload buffer, especially when subscriber may be in listening mode. The very first
829829
// response received from the publisher should be the succeeded or failed response command

0 commit comments

Comments
 (0)