Bug 442790 - kdeconnect wont reconnect with pc after sleep until main window on pc is opened
Summary: kdeconnect wont reconnect with pc after sleep until main window on pc is opened
Status: RESOLVED FIXED
Alias: None
Product: kdeconnect
Classification: Applications
Component: windows-application (show other bugs)
Version: 0.8
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: brute4s99
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-09-21 22:29 UTC by daf
Modified: 2023-03-04 13:07 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description daf 2021-09-21 22:29:18 UTC
SUMMARY

After resuming the PC from sleep the application will not reconnect unless the interface on PC is opened and the paired phone is clicked.


STEPS TO REPRODUCE
1. Put the computer to sleep for a ~1h
2. Resume the computer to sleep
3. Check KDE Connect status

OBSERVED RESULT
The phone wont show as connected. Opening the kde connect application on the phone by itself wont reconnect, opening the main window on PC and clicking the phone icon will re-establish connection.

EXPECTED RESULT
KDE Connect automatedly re-establish connection without user interaction.

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Comment 1 daf 2021-09-21 22:39:04 UTC
Forgot to add the version details:

SOFTWARE/OS VERSIONS
Windows: Windows 10.0.19043 (21H1)
Windows App Version: 0.0.878.0 (windows store version)
Android: 10 (lineage 17.1, build: 10 QQ3A, 200805.001) 
Android App Version: 1.17.0 (not battery optimized)
Comment 2 valdikss 2022-09-17 14:16:22 UTC
*** Bug 451597 has been marked as a duplicate of this bug. ***
Comment 3 Bug Janitor Service 2022-09-17 14:17:07 UTC
A possibly relevant merge request was started @ https://invent.kde.org/network/kdeconnect-kde/-/merge_requests/497
Comment 4 valdikss 2022-09-17 14:19:32 UTC
I believe that https://invent.kde.org/network/kdeconnect-kde/-/merge_requests/497 should fix the issue. I'm not completely sure, but several hour testing with this patch did not trigger this behavior.
Comment 5 Albert Vaca Cintora 2023-03-04 13:07:07 UTC
Git commit bd796836c50bb8293ff6422d0bf24a34cac9c8ba by Albert Vaca Cintora, on behalf of ValdikSS ValdikSS.
Committed on 04/03/2023 at 13:06.
Pushed by albertvaka into branch 'master'.

Enable socket Keep-Alive on Windows

Windows does not use setsockopt for keep-alive configuration,
requiring WSAIoctl call.

https://learn.microsoft.com/en-us/windows/win32/winsock/sio-keepalive-vals
Related: bug 451597

M  +24   -0    core/backends/lan/lanlinkprovider.cpp

https://invent.kde.org/network/kdeconnect-kde/commit/bd796836c50bb8293ff6422d0bf24a34cac9c8ba