diff --git a/src/comm/QGCFlightGearLink.cc b/src/comm/QGCFlightGearLink.cc index e6e234056602b168fff7311ed75e30ba326cd80e..5373d36664ba942a2e22d2b77f24f1216bf2b66f 100644 --- a/src/comm/QGCFlightGearLink.cc +++ b/src/comm/QGCFlightGearLink.cc @@ -90,7 +90,7 @@ void QGCFlightGearLink::run() _udpCommSocket = new QUdpSocket(this); Q_CHECK_PTR(_udpCommSocket); _udpCommSocket->moveToThread(this); - _udpCommSocket->bind(host, port); + _udpCommSocket->bind(host, port, QAbstractSocket::ReuseAddressHint); QObject::connect(_udpCommSocket, SIGNAL(readyRead()), this, SLOT(readBytes())); diff --git a/src/comm/QGCJSBSimLink.cc b/src/comm/QGCJSBSimLink.cc index 9d2c60b196b8806f87d398a7de40fc6f122f0d62..ddca7f62e969934d6598d3c8f8b16842074b2c19 100644 --- a/src/comm/QGCJSBSimLink.cc +++ b/src/comm/QGCJSBSimLink.cc @@ -2,7 +2,7 @@ QGroundControl Open Source Ground Control Station -(c) 2009 - 2011 QGROUNDCONTROL PROJECT +(c) 2009 - 2015 QGROUNDCONTROL PROJECT This file is part of the QGROUNDCONTROL project @@ -24,8 +24,7 @@ This file is part of the QGROUNDCONTROL project /** * @file * @brief Definition of UDP connection (server) for unmanned vehicles - * @see Flightgear Manual http://mapserver.flightgear.org/getstart.pdf - * @author Lorenz Meier + * @author Lorenz Meier * */ @@ -78,7 +77,7 @@ void QGCJSBSimLink::run() if (!mav) return; socket = new QUdpSocket(this); socket->moveToThread(this); - connectState = socket->bind(host, port); + connectState = socket->bind(host, port, QAbstractSocket::ReuseAddressHint); QObject::connect(socket, SIGNAL(readyRead()), this, SLOT(readBytes())); diff --git a/src/comm/QGCXPlaneLink.cc b/src/comm/QGCXPlaneLink.cc index fa991fc308314d97ee03f0275a6eacca30b94046..1004617744a6bd432ae47d59080a77dbe60834eb 100644 --- a/src/comm/QGCXPlaneLink.cc +++ b/src/comm/QGCXPlaneLink.cc @@ -164,7 +164,7 @@ void QGCXPlaneLink::run() socket = new QUdpSocket(this); socket->moveToThread(this); - connectState = socket->bind(localHost, localPort); + connectState = socket->bind(localHost, localPort, QAbstractSocket::ReuseAddressHint); if (!connectState) { emit statusMessage("Binding socket failed!");