mirror of
https://github.com/KDE/kdeconnect-android
synced 2025-09-05 00:25:09 +00:00
Allow sharing of empty files
Summary: When an empty file is shared with the desktop a server is started that times-out after 10sec this causes a notification to be displayed telling the user the transfer failed Test Plan: Send an empty file to the desktop A notification should be displayed telling the user the transfer succeeded Reviewers: #kde_connect, albertvaka Reviewed By: #kde_connect, albertvaka Subscribers: albertvaka, kdeconnect Tags: #kde_connect Differential Revision: https://phabricator.kde.org/D17176
This commit is contained in:
@@ -150,7 +150,7 @@ public class LanLink extends BaseLink {
|
|||||||
|
|
||||||
//Prepare socket for the payload
|
//Prepare socket for the payload
|
||||||
final ServerSocket server;
|
final ServerSocket server;
|
||||||
if (np.hasPayload()) {
|
if (np.hasPayload() && np.getPayloadSize() != 0) {
|
||||||
server = LanLinkProvider.openServerSocketOnFreePort(LanLinkProvider.PAYLOAD_TRANSFER_MIN_PORT);
|
server = LanLinkProvider.openServerSocketOnFreePort(LanLinkProvider.PAYLOAD_TRANSFER_MIN_PORT);
|
||||||
JSONObject payloadTransferInfo = new JSONObject();
|
JSONObject payloadTransferInfo = new JSONObject();
|
||||||
payloadTransferInfo.put("port", server.getLocalPort());
|
payloadTransferInfo.put("port", server.getLocalPort());
|
||||||
|
Reference in New Issue
Block a user