diff options
Diffstat (limited to 'portal')
-rw-r--r-- | portal/lib/portal.mli | 2 | ||||
-rw-r--r-- | portal/lib/ws/portal.ml | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/portal/lib/portal.mli b/portal/lib/portal.mli index 4d7918f..3867f1b 100644 --- a/portal/lib/portal.mli +++ b/portal/lib/portal.mli @@ -1,6 +1,6 @@ open Markup -type t = async parser * (signal option -> unit) +type t = async parser * ((signal, sync) stream option -> unit) val stanza_open : ?from:string -> string -> (signal, sync) stream diff --git a/portal/lib/ws/portal.ml b/portal/lib/ws/portal.ml index 1bffb6d..7ca70db 100644 --- a/portal/lib/ws/portal.ml +++ b/portal/lib/ws/portal.ml @@ -5,7 +5,7 @@ open Markup let jss = Js.string let sjs = Js.to_string -type t = async parser * (signal option -> unit) +type t = async parser * ((signal, sync) stream option -> unit) (* sic. XEP-0156: "host-meta files MUST be fetched only over HTTPS". I don't make the rules. *) let well_known_of (domain : string) = "https://" ^ domain ^ "/.well-known/host-meta" @@ -134,5 +134,5 @@ let connect domain = (0, []) |> Markup_lwt.to_lwt_stream in let+ _ = Lwt_stream.iter (fun x -> ws_push (Some x)) stanzas in ws_push None - in Lwt.async @@ (fun () -> mu_stream |> Markup_lwt.lwt_stream |> to_frames); + in Lwt.async @@ (fun () -> Markup_lwt.(mu_stream |> lwt_stream |> iter to_frames)); ws_stream |> lwt_stream |> strings_to_bytes |> parse_xml ~report, mu_push |