diff options
author | Clombrong <cromblong@egregore.fun> | 2025-06-29 10:54:57 +0200 |
---|---|---|
committer | Clombrong <cromblong@egregore.fun> | 2025-06-29 11:05:03 +0200 |
commit | f22cea587d63a42d2a5f9730d2f11335636f72c4 (patch) | |
tree | 3b32c998345a4235ba15e26cc482edbe6e1a5438 /portal/tcp | |
parent | 8b9aceb312b25d0fc26b421e3c26bec4d95c7b64 (diff) |
fix(portal_tcp): stop choking on input under 7 bytes
Diffstat (limited to 'portal/tcp')
-rw-r--r-- | portal/tcp/portal.ml | 2 |
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 |