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
+
1
5
# 1.11.5
2
6
3
7
- 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
366
366
| `Unix s -> Unix. ADDR_UNIX s
367
367
| `Ip (`Host h , `Port p ) -> Unix. ADDR_INET (Unix. inet_addr_of_string h, p)
368
368
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
369
374
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
375
375
Fiber. map_reduce_errors
376
376
(module Monoid. List (Exn_with_backtrace ))
377
377
~on_error: (fun exn -> Fiber. return [ exn ])
378
378
(fun () -> Csexp_rpc. connect sock sockaddr)
379
379
in
380
380
match session with
381
381
| Error exns ->
382
+ Lev_fiber.Fd. close sock;
382
383
let message =
383
384
let exn = List. hd exns in
384
385
Format. asprintf " unable to connect to dune %s@.%a"
You can’t perform that action at this time.
0 commit comments