Use blocking server socket in non-main threads for active FTP
This is similar to the previous commit, but for active FTP connections.
wxSocketServer was also created directly in this case, without using
wxProtocol ctor, so wxSOCKET_BLOCK must be explicitly specified when
creating it from worker thread, just as it was already done in
d421373c2e
for the other connections and
in the previous commit for passive FTP ones.
See #17937.
This commit is contained in:
parent
40774e1ccd
commit
8d66bfd7ef
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user