Skip to content

Commit

Permalink
Reload on first connection
Browse files Browse the repository at this point in the history
  • Loading branch information
actionshrimp committed Apr 17, 2018
1 parent f7ba4c9 commit fb772e4
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/livereload.ml
Original file line number Diff line number Diff line change
Expand Up @@ -103,5 +103,10 @@ let make_handler
(next : handler)
: handler
= let send_update_fn, handler = make_raw_handler ~debug next in
Lwt.async (fun _ -> Backend.make_watcher ~debug path_configs send_update_fn);
Lwt.async (fun () -> Backend.make_watcher ~debug path_configs send_update_fn);
Lwt.async (fun () ->
Lwt_unix.sleep 1.0 >>= fun _ ->
send_update_fn "/"
);
handler

0 comments on commit fb772e4

Please sign in to comment.