diff options
-rw-r--r-- | portal/tcp/portal_tcp.ml | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/portal/tcp/portal_tcp.ml b/portal/tcp/portal_tcp.ml index 6035f5d..a7c61a0 100644 --- a/portal/tcp/portal_tcp.ml +++ b/portal/tcp/portal_tcp.ml @@ -21,7 +21,14 @@ let stanza_open ?from domain : (signal, sync) stream = Option.fold ~none:attributes ~some:(fun jid -> (("", "from"), jid) :: attributes) - from)] + from); + (* Markup.ml is a streaming parser, but blocks on standalone [`Start_element] + because it doesn't know if this specific element should be self-closing or + not, so [write_xml] never spits out the start of the stream. Adding an empty + comment resolves the ambiguity. I'm not a fan of it. + + If you have Github, feel free to get the word out to aantron. *) + `Comment ""] in stanza |> of_list (** [xmpp_port domain] is the port where [domain]'s XMPP server is hosted. |