1
0
mirror of https://github.com/Ylianst/MeshAgent synced 2025-12-31 23:53:21 +00:00

Dropped autofragmentation size to 5k on Linux, until we figure out why on old hardware on linux, OpenSSL tends to corrupt TLS if we try to encode a large fragment

This commit is contained in:
Bryan Roe
2019-09-19 16:37:45 -07:00
parent dcdbe39a42
commit 6a84582764

View File

@@ -3973,7 +3973,12 @@ int ILibDuktape_httpStream_webSocket_EncodedUnshiftSink(ILibDuktape_DuplexStream
ILibTransport_DoneState ILibDuktape_httpStream_webSocket_DecodedWriteSink(ILibDuktape_DuplexStream *stream, char *buffer, int bufferLen, void *user)
{
ILibDuktape_WebSocket_State *state = (ILibDuktape_WebSocket_State*)user;
int maxsize = 15000;
#if defined(_POSIX)
int maxsize = 5000; // Temporary Work-around until we figure out why on linux on old hardware, sending fragments bigger than this can cause OpenSSL to corrupt the TLS packet
#else
int maxsize = bufferLen;
#endif
int sendSize = 0;
if (bufferLen < maxsize)
{