]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/socket.cpp
fixing focus, fixes #11911
[wxWidgets.git] / src / common / socket.cpp
index 44b408c49cef9fe5ca76b19d86aa42fcf37cbfb2..228fe79a28d64f10c1ab23ed31520131e77621d4 100644 (file)
@@ -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);