aboutsummaryrefslogtreecommitdiff
path: root/portal
diff options
context:
space:
mode:
Diffstat (limited to 'portal')
-rw-r--r--portal/tcp/portal.ml6
1 files changed, 5 insertions, 1 deletions
diff --git a/portal/tcp/portal.ml b/portal/tcp/portal.ml
index fc19fc0..9241312 100644
--- a/portal/tcp/portal.ml
+++ b/portal/tcp/portal.ml
@@ -133,7 +133,11 @@ let socket_to_stream (sock : socket) =
if len > 0 then
begin
send_pos := 0;
- flush_socket len
+ if (Lwt_bytes.proxy send_buffer (len-7) len |> Lwt_bytes.to_string) = "<!---->"
+ then if (len - 7) > 0
+ then flush_socket (len - 7)
+ else Lwt.return_unit
+ else flush_socket len
end
else Lwt.return_unit
in