File tree Expand file tree Collapse file tree 2 files changed +10
-5
lines changed
Expand file tree Collapse file tree 2 files changed +10
-5
lines changed Original file line number Diff line number Diff line change 1+ # 1.11.6
2+
3+ - Stop leaking file descriptors like a sieve (#701 )
4+
15# 1.11.5
26
37- Fix process termination. Once the lsp server is stepped, the process will
Original file line number Diff line number Diff line change @@ -366,19 +366,20 @@ end = struct
366366 | `Unix s -> Unix. ADDR_UNIX s
367367 | `Ip (`Host h , `Port p ) -> Unix. ADDR_INET (Unix. inet_addr_of_string h, p)
368368 in
369+ let sock =
370+ let domain = Unix. domain_of_sockaddr sockaddr in
371+ let socket = Unix. socket ~cloexec: true domain Unix. SOCK_STREAM 0 in
372+ Lev_fiber.Fd. create socket (`Non_blocking false )
373+ in
369374 let * session =
370- let sock =
371- let domain = Unix. domain_of_sockaddr sockaddr in
372- let socket = Unix. socket ~cloexec: true domain Unix. SOCK_STREAM 0 in
373- Lev_fiber.Fd. create socket (`Non_blocking false )
374- in
375375 Fiber. map_reduce_errors
376376 (module Monoid. List (Exn_with_backtrace ))
377377 ~on_error: (fun exn -> Fiber. return [ exn ])
378378 (fun () -> Csexp_rpc. connect sock sockaddr)
379379 in
380380 match session with
381381 | Error exns ->
382+ Lev_fiber.Fd. close sock;
382383 let message =
383384 let exn = List. hd exns in
384385 Format. asprintf " unable to connect to dune %s@.%a"
You can’t perform that action at this time.
0 commit comments