diff --git a/src/node/net/p2p.ml b/src/node/net/p2p.ml index 0f9ac312f..5eb0fb4ca 100644 --- a/src/node/net/p2p.ml +++ b/src/node/net/p2p.ml @@ -494,7 +494,7 @@ module Make (P: PARAMS) = struct let received = !counter in ma#add_int (received - old_received); inner received in - Lwt.async (fun () -> inner !counter) + Lwt.async (fun () -> Lwt.pick [cancelation (); inner !counter]) in (* net object state *) let last = ref (Unix.gettimeofday ()) in