File tree Expand file tree Collapse file tree 2 files changed +4
-8
lines changed
google/cloud/alloydb/connector Expand file tree Collapse file tree 2 files changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -233,10 +233,8 @@ def metadata_exchange(
233
233
# pack big-endian unsigned integer (4 bytes)
234
234
packed_len = struct .pack (">I" , req .ByteSize ())
235
235
236
- # send metadata message length
237
- sock .sendall (packed_len )
238
- # send metadata request message
239
- sock .sendall (req .SerializeToString ())
236
+ # send metadata message length and request message
237
+ sock .sendall (packed_len + req .SerializeToString ())
240
238
241
239
# form metadata exchange response
242
240
resp = connectorspb .MetadataExchangeResponse ()
Original file line number Diff line number Diff line change @@ -256,10 +256,8 @@ def metadata_exchange(sock: ssl.SSLSocket) -> None:
256
256
# pack big-endian unsigned integer (4 bytes)
257
257
resp_len = struct .pack (">I" , resp .ByteSize ())
258
258
259
- # send metadata response message length
260
- sock .sendall (resp_len )
261
- # send metadata request response message
262
- sock .sendall (resp .SerializeToString ())
259
+ # send metadata response length and response message
260
+ sock .sendall (resp_len + resp .SerializeToString ())
263
261
264
262
265
263
class FakeConnectionInfo :
You can’t perform that action at this time.
0 commit comments