From ed75129278077d50f55928b18bb7212ac6d9b695 Mon Sep 17 00:00:00 2001 From: kevin Date: Tue, 12 Jan 2021 15:59:02 -0500 Subject: [PATCH] cwWebSock.cpp : Replace queue with blocking queue to prevent possible problems on ARM based machines. --- cwWebSock.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/cwWebSock.cpp b/cwWebSock.cpp index 16ddfd7..c6207e8 100644 --- a/cwWebSock.cpp +++ b/cwWebSock.cpp @@ -3,8 +3,9 @@ #include "cwCommonImpl.h" #include "cwMem.h" #include "cwFileSys.h" +#include "cwMutex.h" #include "cwWebSock.h" -#include "cwMpScNbQueue.h" +#include "cwMpScQueue.h" #include @@ -35,7 +36,7 @@ namespace cw unsigned _nextSessionId = 0; // Next session id. unsigned _connSessionN = 0; // Count of connected sessions. struct lws_http_mount* _mount = nullptr; // - MpScNbQueue* _q; // Thread safe, non-blocking, protocol independent msg queue. + MpScQueue* _q; // Thread safe, non-blocking, protocol independent msg queue. lws_pollfd* _pollfdA; // socket handle array used by poll() int _pollfdMaxN; @@ -444,7 +445,7 @@ cw::rc_t cw::websock::create( info.mounts = p->_mount; info.protocols = p->_protocolA; - p->_q = new MpScNbQueue(); + p->_q = new MpScQueue(); p->_cbFunc = cbFunc; p->_cbArg = cbArg;