aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/session.ml3
-rw-r--r--test/hello.ml2
2 files changed, 4 insertions, 1 deletions
diff --git a/lib/session.ml b/lib/session.ml
index 7a69d37..cb44653 100644
--- a/lib/session.ml
+++ b/lib/session.ml
@@ -61,3 +61,6 @@ let create (config : config) : t Lwt.t =
| _ -> Lwt.return_unit)
state >|= S.keep;
in { state; update }
+
+let connect (session : t) (domain : Portal.domain) : unit =
+ session.update (Connecting domain)
diff --git a/test/hello.ml b/test/hello.ml
index cd4f5bb..3504af4 100644
--- a/test/hello.ml
+++ b/test/hello.ml
@@ -22,7 +22,7 @@ let main =
Lwt.wakeup wakener ()
| _ -> ())
state |> S.keep;
- update (Connecting config.sasl.jid.domainpart);
+ connect { state; update } config.sasl.jid.domainpart;
waiter
with exn ->
begin