Skip to content

Commit

Permalink
Use new Dump message for protocol >= 3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
fantix committed Nov 27, 2024
1 parent c543fd4 commit 0ef066f
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions gel/protocol/protocol.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -539,8 +539,13 @@ cdef class SansIOProtocol:
self.reset_status()

buf = WriteBuffer.new_message(DUMP_MSG)
buf.write_int16(0) # no headers
buf.end_message()
if self.protocol_version >= (3, 0):
buf.write_int16(0) # no annotations
buf.write_int64(0) # flags
buf.end_message()
else:
buf.write_int16(0) # no headers
buf.end_message()
buf.write_bytes(SYNC_MESSAGE)
self.write(buf)

Expand Down Expand Up @@ -641,7 +646,7 @@ cdef class SansIOProtocol:
self.reset_status()

buf = WriteBuffer.new_message(RESTORE_MSG)
buf.write_int16(0) # no headers
buf.write_int16(0) # no attributes
buf.write_int16(1) # -j level
buf.write_bytes(header)
buf.end_message()
Expand Down

0 comments on commit 0ef066f

Please sign in to comment.