diff options
author | Christian Kandeler <christian.kandeler@theqtcompany.com> | 2015-10-14 17:55:31 +0200 |
---|---|---|
committer | Alex Blasche <alexander.blasche@theqtcompany.com> | 2015-11-17 19:10:56 +0000 |
commit | a8d80a81d56f0fb85c41bf6ec5716c5ce7e5dac0 (patch) | |
tree | 972dd6c47e4970eb8f6724a8637b191aa34a298b /src | |
parent | a5f362af452555b5aaa4585be82053029e4b25c0 (diff) |
QBluetoothSocket: Do not report an error when the connection closes.
Higher-level code should decide whether a remote device disconnecting
constitutes an error or not.
Change-Id: I50d7524d2684dbbbfc8df5667e227748fb31cee4
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/bluetooth/qbluetoothsocket_bluez.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/bluetooth/qbluetoothsocket_bluez.cpp b/src/bluetooth/qbluetoothsocket_bluez.cpp index 43933f26..6e93f64c 100644 --- a/src/bluetooth/qbluetoothsocket_bluez.cpp +++ b/src/bluetooth/qbluetoothsocket_bluez.cpp @@ -267,9 +267,9 @@ void QBluetoothSocketPrivate::_q_readNotify() connectWriteNotifier->setEnabled(false); errorString = qt_error_string(errsv); qCWarning(QT_BT_BLUEZ) << Q_FUNC_INFO << socket << "error:" << readFromDevice << errorString; - if(errsv == EHOSTDOWN) + if (errsv == EHOSTDOWN) q->setSocketError(QBluetoothSocket::HostNotFoundError); - else + else if (errsv != ECONNRESET) // The other side closing the connection is not an error. q->setSocketError(QBluetoothSocket::UnknownSocketError); q->disconnectFromService(); |