From 50d43717d992e46ad9343d0f8c7aeed96896f299 Mon Sep 17 00:00:00 2001 From: Lasse Blaauwbroek Date: Wed, 17 Feb 2021 16:42:56 +0100 Subject: [PATCH] Fix #223 by skipping the setting of object_id if it is empty --- capnp-rpc-net/serialise.ml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/capnp-rpc-net/serialise.ml b/capnp-rpc-net/serialise.ml index 430bfdf5f..7c935eda8 100644 --- a/capnp-rpc-net/serialise.ml +++ b/capnp-rpc-net/serialise.ml @@ -70,7 +70,8 @@ module Make (EP : Capnp_core.ENDPOINT) = struct let b = Message.init_root ~message_size:100 () in let boot = Message.bootstrap_init b in Bootstrap.question_id_set boot (QuestionId.uint32 qid); - Schema.BuilderOps.write_string (Bootstrap.deprecated_object_id_get boot) object_id; + if not (String.equal object_id "") then + Schema.BuilderOps.write_string (Bootstrap.deprecated_object_id_get boot) object_id; Message.to_message b | `Call (qid, target, request, descs, results_to) -> let c = Msg.Request.writable request in