diff --git a/cocos/network/WebSocket.cpp b/cocos/network/WebSocket.cpp index 790e193035..6885eef508 100644 --- a/cocos/network/WebSocket.cpp +++ b/cocos/network/WebSocket.cpp @@ -540,7 +540,8 @@ int WebSocket::onSocketCallback(struct libwebsocket_context *ctx, size_t remaining = data->len - data->issued; size_t n = std::min(remaining, c_bufferSize ); - CCLOG("[websocket:send] total: %d, sent: %d, remaining: %d, buffer size: %d", static_cast(data->len), static_cast(data->issued), static_cast(remaining), static_cast(n)); + //fixme: the log is not thread safe +// CCLOG("[websocket:send] total: %d, sent: %d, remaining: %d, buffer size: %d", static_cast(data->len), static_cast(data->issued), static_cast(remaining), static_cast(n)); unsigned char* buf = new unsigned char[LWS_SEND_BUFFER_PRE_PADDING + n + LWS_SEND_BUFFER_POST_PADDING]; @@ -570,7 +571,8 @@ int WebSocket::onSocketCallback(struct libwebsocket_context *ctx, } bytesWrite = libwebsocket_write(wsi, &buf[LWS_SEND_BUFFER_PRE_PADDING], n, (libwebsocket_write_protocol)writeProtocol); - CCLOG("[websocket:send] bytesWrite => %d", bytesWrite); + //fixme: the log is not thread safe +// CCLOG("[websocket:send] bytesWrite => %d", bytesWrite); // Buffer overrun? if (bytesWrite < 0) @@ -603,8 +605,8 @@ int WebSocket::onSocketCallback(struct libwebsocket_context *ctx, case LWS_CALLBACK_CLOSED: { - - CCLOG("%s", "connection closing.."); + //fixme: the log is not thread safe +// CCLOG("%s", "connection closing.."); _wsHelper->quitSubThread();