We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1de685b commit 3ab8baeCopy full SHA for 3ab8bae
cassandra/connection.py
@@ -1122,8 +1122,9 @@ def _process_segment_buffer(self):
1122
segment = self._segment_codec.decode(self._iobuf, segment_header)
1123
self._io_buffer.cql_frame_buffer.write(segment.payload)
1124
else:
1125
- # not enough data to read the segment
1126
- self._io_buffer.io_buffer.seek(0, 2)
+ # not enough data to read the segment. reset the buffer pointer at the
+ # beginning to not lose what we previously read (header).
1127
+ self._io_buffer.io_buffer.seek(0)
1128
except CrcException as exc:
1129
# re-raise an exception that inherits from ConnectionException
1130
raise CrcMismatchException(str(exc), self.endpoint)
0 commit comments