diff --git a/src/net/streamsocket.cpp b/src/net/streamsocket.cpp --- a/src/net/streamsocket.cpp +++ b/src/net/streamsocket.cpp @@ -65,7 +65,9 @@ if (buffer.isEmpty()) return 0; - int to_send = qMin(buffer.size(), max); + + // max 0 means unlimited transfer, try to send the entire buffer then + int to_send = (max == 0) ? buffer.size() : qMin(buffer.size(), max); int ret = sock->send((const bt::Uint8*)buffer.data(), to_send); if (ret == to_send) {