P2p: improve cancelation in maintenance

This commit is contained in:
Grégoire Henry 2019-02-20 15:02:01 +01:00
parent 07595c9e1f
commit 359f2d6932
No known key found for this signature in database
GPG Key ID: 50D984F20BD445D2

View File

@ -114,7 +114,9 @@ let rec try_to_contact
else
List.fold_left
(fun acc point ->
P2p_pool.connect pool point >>= function
protect ~canceler:st.canceler begin fun () ->
P2p_pool.connect pool point
end >>= function
| Ok _ -> acc >|= succ
| Error _ -> acc)
(Lwt.return 0)