Don't crash on Autobahn testing

This commit is contained in:
Alex Hultman
2018-11-21 19:09:42 +01:00
parent 1a3395bb5a
commit 8bf87c9147
3 changed files with 5 additions and 3 deletions
+3 -1
View File
@@ -20,13 +20,15 @@ public:
// if corkAllocate(size) then corkFree(unused)
// format the response
char buf[100];
char *buf = (char *) malloc(message.length() + 100);
int writeLength = WebSocketProtocol<isServer, WebSocket<SSL, isServer>>::formatMessage(buf, message.data(), message.length(), opCode, message.length(), false);
Super::write(buf, writeLength);
free(buf);
}
// absolutely not public!