Never compress 0 bytes, finish pub/sub ded. compr.

This commit is contained in:
Alex Hultman
2020-06-22 07:10:43 +02:00
parent e9e6d3fa34
commit f52d816032
5 changed files with 21 additions and 10 deletions
+1 -1
View File
@@ -28,7 +28,7 @@ int main() {
/* Open event here, you may access ws->getUserData() which points to a PerSocketData struct */
},
.message = [](auto *ws, std::string_view message, uWS::OpCode opCode) {
ws->send(message, opCode);
ws->send(message, opCode, true);
},
.drain = [](auto *ws) {
/* Check ws->getBufferedAmount() here */