Skip to content

Commit

Permalink
WIP: fix duplicate NAKs
Browse files Browse the repository at this point in the history
This is just a hack to make the git clone work, need to be cleaned and verified!

Signed-off-by: Paul-Elliot <peada@free.fr>
  • Loading branch information
panglesd authored and dinosaure committed Nov 20, 2023
1 parent 8f60787 commit cd599fb
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions src/not-so-smart/upload_pack.ml
Original file line number Diff line number Diff line change
Expand Up @@ -133,16 +133,20 @@ struct
match cmd with
| `Done -> (
match Server_neg.last_common neg with
| Some ack ->
let ack = Smart.Negotiation.map ~f:to_hex ack in
Smart_flow.run sched fail io flow
Smart.(send ctx send_acks [ ack ])
|> prj
>>= fun () -> return neg
| Some _ack ->
(* TODO: work out when to send NAKs to follow the protocol... *)
(* let ack = Smart.Negotiation.map ~f:to_hex ack in *)
(* Smart_flow.run sched fail io flow *)
(* Smart.(send ctx send_acks [ ack ]) *)
(* |> prj *)
(* >>= fun () -> return neg *)
return neg
| None ->
Smart_flow.run sched fail io flow Smart.(send ctx send_acks [])
|> prj
>>= fun () -> return neg)
(* TODO: work out when to send NAKs to follow the protocol... *)
(* Smart_flow.run sched fail io flow Smart.(send ctx send_acks []) *)
(* |> prj *)
(* >>= fun () -> *)
return neg)
| `Flush -> negotiate neg
in
negotiate Server_neg.empty >>= fun neg ->
Expand Down

0 comments on commit cd599fb

Please sign in to comment.