mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-08 09:28:41 +00:00
fixed issue with failing async_accept on windows
This commit is contained in:
parent
1690fd846b
commit
8f030fb112
1 changed files with 13 additions and 0 deletions
|
@ -89,6 +89,10 @@ namespace
|
||||||
} openssl_global_destructor;
|
} openssl_global_destructor;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
#ifdef _WIN32
|
||||||
|
// for ERROR_SEM_TIMEOUT
|
||||||
|
#include <winerror.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
using boost::shared_ptr;
|
using boost::shared_ptr;
|
||||||
|
@ -924,6 +928,15 @@ namespace detail
|
||||||
std::string msg = "error accepting connection on '"
|
std::string msg = "error accepting connection on '"
|
||||||
+ boost::lexical_cast<std::string>(ep) + "' " + e.message();
|
+ boost::lexical_cast<std::string>(ep) + "' " + e.message();
|
||||||
(*m_logger) << msg << "\n";
|
(*m_logger) << msg << "\n";
|
||||||
|
#endif
|
||||||
|
#ifdef _WIN32
|
||||||
|
// Windows sometimes generates this error. It seems to be
|
||||||
|
// non-fatal and we have to do another async_accept.
|
||||||
|
if (e.value() == ERROR_SEM_TIMEOUT)
|
||||||
|
{
|
||||||
|
async_accept(listener);
|
||||||
|
return;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
if (m_alerts.should_post(alert::fatal))
|
if (m_alerts.should_post(alert::fatal))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue