summaryrefslogtreecommitdiffstats
path: root/src/bluetooth/qbluetoothsocket_bluez.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/bluetooth/qbluetoothsocket_bluez.cpp')
-rw-r--r--src/bluetooth/qbluetoothsocket_bluez.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/bluetooth/qbluetoothsocket_bluez.cpp b/src/bluetooth/qbluetoothsocket_bluez.cpp
index 6aef811a..17b8e738 100644
--- a/src/bluetooth/qbluetoothsocket_bluez.cpp
+++ b/src/bluetooth/qbluetoothsocket_bluez.cpp
@@ -290,7 +290,9 @@ void QBluetoothSocketPrivate::_q_readNotify()
qCWarning(QT_BT_BLUEZ) << Q_FUNC_INFO << socket << "error:" << readFromDevice << errorString;
if (errsv == EHOSTDOWN)
q->setSocketError(QBluetoothSocket::HostNotFoundError);
- else if (errsv != ECONNRESET) // The other side closing the connection is not an error.
+ else if (errsv == ECONNRESET)
+ q->setSocketError(QBluetoothSocket::RemoteHostClosedError);
+ else
q->setSocketError(QBluetoothSocket::UnknownSocketError);
q->disconnectFromService();