feschber / lan-mouse

mouse & keyboard sharing via LAN
GNU General Public License v3.0
2.62k stars 84 forks source link

"device not responding" when typing (keyboard) from Linux to MacOS #220

Closed PedroHLC closed 1 week ago

PedroHLC commented 3 weeks ago

On 7496015d8d36fe58cc2f915991e90d1acc1aa9cd, when typing from Linux/wlroots (capture) to MacOS (emulates), if I enter two keys quickly (same second) some random key gets stuck instead, output on MacOS side starts repeating the following:

WARN  lan_mouse::server::ping_task] client not responding, releasing pointer!
WARN  lan_mouse::server::ping_task] device not responding, releasing keys!
WARN  lan_mouse::server::ping_task] device not responding, releasing keys!
WARN  lan_mouse::server::ping_task] device not responding, releasing keys!
WARN  lan_mouse::server::ping_task] device not responding, releasing keys!
WARN  lan_mouse::server::ping_task] device not responding, releasing keys!
WARN  lan_mouse::server::ping_task] device not responding, releasing keys!
WARN  lan_mouse::server::ping_task] device not responding, releasing keys!
WARN  lan_mouse::server::ping_task] device not responding, releasing keys!
WARN  lan_mouse::server::network_task] udp send failed: network error: `No route to host (os error 65)`
WARN  lan_mouse::server::ping_task] device not responding, releasing keys!
WARN  lan_mouse::server::network_task] udp send failed: network error: `Host is down (os error 64)`
WARN  lan_mouse::server::ping_task] device not responding, releasing keys!
WARN  lan_mouse::server::network_task] udp send failed: network error: `Host is down (os error 64)`
WARN  lan_mouse::server::ping_task] device not responding, releasing keys!
WARN  lan_mouse::server::network_task] udp send failed: network error: `Host is down (os error 64)`
WARN  lan_mouse::server::ping_task] device not responding, releasing keys!
WARN  lan_mouse::server::network_task] udp send failed: network error: `Host is down (os error 64)`
WARN  lan_mouse::server::ping_task] device not responding, releasing keys!
WARN  lan_mouse::server::network_task] udp send failed: network error: `Host is down (os error 64)`
WARN  lan_mouse::server::ping_task] device not responding, releasing keys!
WARN  lan_mouse::server::network_task] udp send failed: network error: `Host is down (os error 64)`
WARN  lan_mouse::server::ping_task] device not responding, releasing keys!
WARN  lan_mouse::server::network_task] udp send failed: network error: `Host is down (os error 64)`
WARN  lan_mouse::server::ping_task] device not responding, releasing keys!
WARN  lan_mouse::server::network_task] udp send failed: network error: `Host is down (os error 64)`
WARN  lan_mouse::server::ping_task] device not responding, releasing keys!
WARN  lan_mouse::server::network_task] udp send failed: network error: `Host is down (os error 64)`
WARN  lan_mouse::server::ping_task] device not responding, releasing keys!
WARN  lan_mouse::server::network_task] udp send failed: network error: `Host is down (os error 64)`
WARN  lan_mouse::server::ping_task] device not responding, releasing keys!
WARN  lan_mouse::server::network_task] udp send failed: network error: `Host is down (os error 64)`
WARN  lan_mouse::server::ping_task] device not responding, releasing keys!
WARN  lan_mouse::server::network_task] udp send failed: network error: `Host is down (os error 64)`
WARN  lan_mouse::server::ping_task] device not responding, releasing keys!
WARN  lan_mouse::server::network_task] udp send failed: network error: `Host is down (os error 64)`

It only stops when I kill -KILL it, Ctrl+C shows INFO lan_mouse::server] terminating service but never exists.

The same does not happen if I invert the actors (MacOS captures, wlroots emulates), and I can keep the connection going for hours if I type very slowly.

I always need to restart it on the MacOS side.


On top of that, good work overall with this app, been using it sporadically since February!

NOTE: With the macOS, I only tested this commit and commit 9248007986ade8a0690ce37bccbf463927d2df6b. When I tried 9248007 in the macOS, the other machines couldn't connect to it at all, and I skipped directly to the last commit, this last commit connects, but I need to ssh machine -- killall -KILL lan-mouse when I forget about this issue.

PedroHLC commented 1 week ago

I'm unable to reproduce this in the latest commit.

feschber commented 1 week ago

Sorry I did not respond earlier. The whole response tracking / ping logic has changed with the encryption stuff, hopefully it's working better now ;)