Skip to content

Commit

Permalink
Engine: separate_handshakes is not a result
Browse files Browse the repository at this point in the history
  • Loading branch information
hannesm committed Jan 3, 2024
1 parent 82017a5 commit 9df5c57
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/engine.ml
Original file line number Diff line number Diff line change
Expand Up @@ -391,10 +391,10 @@ let early_data s =

let rec separate_handshakes buf =
match Reader.parse_handshake_frame buf with
| None, rest -> Ok ([], rest)
| None, rest -> [], rest
| Some hs, rest ->
let* rt, frag = separate_handshakes rest in
Ok (hs :: rt, frag)
let rt, frag = separate_handshakes rest in
hs :: rt, frag

let handle_change_cipher_spec = function
| Client cs -> Handshake_client.handle_change_cipher_spec cs
Expand Down Expand Up @@ -443,7 +443,7 @@ let handle_packet hs buf = function
Ok (hs, items, None, `No_err)

| Packet.HANDSHAKE ->
let* hss, hs_fragment = separate_handshakes (hs.hs_fragment <+> buf) in
let hss, hs_fragment = separate_handshakes (hs.hs_fragment <+> buf) in
let hs = { hs with hs_fragment } in
let* hs, items =
List.fold_left (fun acc raw ->
Expand Down

0 comments on commit 9df5c57

Please sign in to comment.