Ignore connection refused errors on UDP sockets

In Qt 5.6 the optional connection refused error from a UDP socket that
is written  to where no server  is listening is signalled.  This error
only happens when  the o/s can tell  that no one is  listening i.e. on
the local host loopback address. We  can safely ignore these errors as
we do not care if anyone is listening or not.

git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@6701 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Bill Somerville 2016-05-25 15:34:19 +00:00
parent 1954982e2c
commit 6990f7e9b1
1 changed files with 7 additions and 3 deletions

View File

@ -281,9 +281,13 @@ MessageClient::MessageClient (QString const& id, QString const& server, port_typ
, [this] (impl::SocketError e)
{
#if defined (Q_OS_WIN) && QT_VERSION >= 0x050500
if (e != impl::NetworkError) // take this out when Qt 5.5
// stops doing this
// spuriously
if (e != impl::NetworkError // take this out when Qt 5.5
// stops doing this
// spuriously
&& e != impl::ConnectionRefusedError) // not
// interested
// in this with
// UDP socket
#else
Q_UNUSED (e);
#endif