Commits

Oliver Gu  committed 62c8770

A response with a query id requires the id during unpickling

  • Participants
  • Parent commits c2d5cfd

Comments (0)

Files changed (1)

       ~unpickler:Commission_report.unpickler
       ~action:`Keep
       ~f:extend_commission_report;
-
     return t
 
   let is_closed t = Ivar.is_full t.stop
   let read_version_and_query_id reader tag =
     if Recv_tag.corresponding_response_has_query_id tag then
       let unpickler = Unpickler.create ~name:"Version_id"
-        Unpickler.Spec.(value (required int) ~name:"version"
-          ++ value (optional Query_id.val_type) ~name:"query_id")
-        (fun version query_id -> (version, query_id))
+        Unpickler.Spec.(
+          value (required int) ~name:"version"
+          ++ value (required Query_id.val_type) ~name:"query_id")
+        (fun version query_id -> (version, Some query_id))
       in
       read_tws reader unpickler ~len:2
     else