diff --git a/DOCKER_VERSION b/DOCKER_VERSION index 09d22fa5..d938f420 100644 --- a/DOCKER_VERSION +++ b/DOCKER_VERSION @@ -1 +1 @@ -6.2.6 +6.2.7 diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index e9766e9d..2a497846 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -1,6 +1,10 @@ # Changelog All notable changes to this project will be documented in this file. +## [6.2.7] - 2019-09-25 + +- Stop having ws send subcommand send a binary message in text mode, which would cause error in `make ws_test` shell script test. + ## [6.2.6] - 2019-09-24 - Fix 2 race conditions detected with TSan, one in CobraMetricsPublisher::push and another one in WebSocketTransport::sendData (that one was bad). diff --git a/ixwebsocket/IXWebSocketVersion.h b/ixwebsocket/IXWebSocketVersion.h index a7613f74..b64535c2 100644 --- a/ixwebsocket/IXWebSocketVersion.h +++ b/ixwebsocket/IXWebSocketVersion.h @@ -6,4 +6,4 @@ #pragma once -#define IX_WEBSOCKET_VERSION "6.2.6" +#define IX_WEBSOCKET_VERSION "6.2.7" diff --git a/test/IXWebSocketChatTest.cpp b/test/IXWebSocketChatTest.cpp index 01080a86..2bf6b456 100644 --- a/test/IXWebSocketChatTest.cpp +++ b/test/IXWebSocketChatTest.cpp @@ -273,7 +273,7 @@ TEST_CASE("Websocket_chat", "[websocket_chat]") chatB.sendMessage("from B1"); chatB.sendMessage("from B2"); - // Test large messages that needs to be broken into small fragments + // Test large messages that need to be broken into small fragments size_t size = 1 * 1024 * 1024; // ~1Mb std::string bigMessage(size, 'a'); chatB.sendMessage(bigMessage); diff --git a/ws/ws_receive.cpp b/ws/ws_receive.cpp index 24b30e81..ebb62a0a 100644 --- a/ws/ws_receive.cpp +++ b/ws/ws_receive.cpp @@ -59,7 +59,7 @@ namespace ix , _delayMs(delayMs) , _receivedFragmentCounter(0) { - ; + _webSocket.disableAutomaticReconnection(); } void WebSocketReceiver::stop() @@ -113,7 +113,7 @@ namespace ix pdu["message"] = errMsg; MsgPack msg(pdu); - _webSocket.send(msg.dump()); + _webSocket.sendBinary(msg.dump()); } void WebSocketReceiver::handleMessage(const std::string& str) @@ -164,8 +164,9 @@ namespace ix pdu["id"] = data["id"]; pdu["filename"] = data["filename"]; + std::cout << "Sending ack to sender" << std::endl; MsgPack msg(pdu); - _webSocket.send(msg.dump()); + _webSocket.sendBinary(msg.dump()); } void WebSocketReceiver::start() diff --git a/ws/ws_send.cpp b/ws/ws_send.cpp index 757e21e9..8f0272fb 100644 --- a/ws/ws_send.cpp +++ b/ws/ws_send.cpp @@ -52,7 +52,7 @@ namespace ix : _url(url) , _enablePerMessageDeflate(enablePerMessageDeflate) { - ; + _webSocket.disableAutomaticReconnection(); } void WebSocketSender::stop()