P2p: bugfix
This commit is contained in:
parent
215da8fa7e
commit
ba014261dc
@ -188,7 +188,7 @@ module Make (P: PARAMS) = struct
|
|||||||
let len = EndianBigstring.BigEndian.get_uint16 buf 0 in
|
let len = EndianBigstring.BigEndian.get_uint16 buf 0 in
|
||||||
(* TODO timeout read ??? *)
|
(* TODO timeout read ??? *)
|
||||||
Lwt_utils.read_mbytes ~len fd buf >>= fun () ->
|
Lwt_utils.read_mbytes ~len fd buf >>= fun () ->
|
||||||
let buf = MBytes.sub buf hdrlen len in
|
let buf = MBytes.sub buf 0 len in
|
||||||
match uncrypt buf with
|
match uncrypt buf with
|
||||||
| None ->
|
| None ->
|
||||||
(* TODO track invalid message *)
|
(* TODO track invalid message *)
|
||||||
|
Loading…
Reference in New Issue
Block a user