aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--portal/tcp/portal.ml2
1 files changed, 1 insertions, 1 deletions
diff --git a/portal/tcp/portal.ml b/portal/tcp/portal.ml
index d36563a..576ed40 100644
--- a/portal/tcp/portal.ml
+++ b/portal/tcp/portal.ml
@@ -93,7 +93,7 @@ let socket_to_stream (sock : socket) =
if len > 0 then
begin
send_pos := 0;
- if (Lwt_bytes.proxy send_buffer (len-7) len |> Lwt_bytes.to_string) = "<!---->"
+ if len >= 7 && (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