do not crash on exns arising from network input

This commit is contained in:
Vincent Bernardoff 2016-10-10 15:37:33 +02:00
parent cc83d8444b
commit 8e02ddb1f6

View File

@ -406,7 +406,7 @@ let connect_to_peer config limits my_gid socket (addr, port) push white_listed =
Format.asprintf Format.asprintf
"(%a) connection handler for %a:%d" "(%a) connection handler for %a:%d"
pp_gid my_gid Ipaddr.pp_hum addr port in pp_gid my_gid Ipaddr.pp_hum addr port in
ignore (worker worker_name connect cancel) ; ignore (worker ~safe:true worker_name ~run:connect ~cancel) ;
(* return the canceler *) (* return the canceler *)
cancel cancel