Don't crash on Autobahn testing
This commit is contained in:
+3
-1
@@ -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!
|
||||
|
||||
Reference in New Issue
Block a user