X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/74b1f0b45e0f0bc7e25c5f32bb495e3e4bcd3392..08043a1c27d89dd18b7c3d12bc45d777ec4bb97f:/src/common/socket.cpp diff --git a/src/common/socket.cpp b/src/common/socket.cpp index 44b408c49c..228fe79a28 100644 --- a/src/common/socket.cpp +++ b/src/common/socket.cpp @@ -1109,6 +1109,9 @@ wxSocketBase& wxSocketBase::Peek(void* buffer, wxUint32 nbytes) { wxSocketReadGuard read(this); + // Peek() should never block + wxSocketWaitModeChanger changeFlags(this, wxSOCKET_NOWAIT); + m_lcount = DoRead(buffer, nbytes); Pushback(buffer, m_lcount);