Skip to content

Commit ebc0905

Browse files
committed
Close channels when dune disconnects
Signed-off-by: Rudi Grinberg <[email protected]>
1 parent c88be05 commit ebc0905

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

ocaml-lsp-server/src/dune.ml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,8 @@ end = struct
9292
let+ (_ : Unix.process_status) = Scheduler.wait_for_process t.pid in
9393
Scheduler.stop t.in_thread;
9494
Scheduler.stop t.out_thread;
95-
()
95+
close_out_noerr t.out_chan;
96+
close_in_noerr t.in_chan
9697
end
9798

9899
module Client =

ocaml-lsp-server/src/progress.ml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
open Import
22

33
type enabled =
4-
(* TODO this needs to be mutexed *)
5-
{ mutable token : ProgressToken.t option
4+
{ (* TODO this needs to be mutexed *)
5+
mutable token : ProgressToken.t option
66
; mutable build_counter : int
77
; report_progress :
88
Server_notification.Progress.t ProgressParams.t -> unit Fiber.t

0 commit comments

Comments
 (0)