aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/stream.ml7
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/stream.ml b/lib/stream.ml
index 21c134d..ea64f0a 100644
--- a/lib/stream.ml
+++ b/lib/stream.ml
@@ -43,12 +43,9 @@ let get (stream : (signal, async) stream) : Xml.element Lwt.t =
let start domain : Portal.t Lwt.t =
let* stream, _push = Portal.connect domain
in let push = function
- | None -> _push (Some Portal.stanza_close);
- _push None;
+ | None -> Portal.close (stream, _push);
| anything -> _push anything
- in Some (Portal.stanza_open domain) |> push;
- (* TODO: check this is a good stanza *)
- let+ _ = get stream
+ in let+ _id = Portal.negotiate domain (stream, _push)
in stream, push
(** [parse_features el] is a [stream_features] record with all the features of the