diff --git a/src/common/ftp.cpp b/src/common/ftp.cpp index 84ad5f28f9..d1cd21b60b 100644 --- a/src/common/ftp.cpp +++ b/src/common/ftp.cpp @@ -582,7 +582,13 @@ wxSocketBase *wxFTP::GetActivePort() addrNew.AnyAddress(); addrNew.Service(0); // pick an open port number. - wxSocketServer *sockSrv = new wxSocketServer(addrNew); + wxSocketServer* const + sockSrv = new wxSocketServer + ( + addrNew, + wxSocketServer::GetBlockingFlagIfNeeded() + ); + if (!sockSrv->IsOk()) { // We use IsOk() here to see if everything is ok