Skip to content
This repository has been archived by the owner on Dec 6, 2021. It is now read-only.

WARN - set_keepalive error; Invalid argument (os error 22) #45

Open
WhiskeyTuesday opened this issue Sep 7, 2019 · 1 comment
Open

Comments

@WhiskeyTuesday
Copy link

Whenever I use the CLI I get the warning WARN - set_keepalive error; Invalid argument (os error 22)

I'm only testing out the program right now so this is on a laptop running Ubuntu 18.04.3 LTS, kernal 5.0.0-25-generic.

@Kerollmops
Copy link
Member

The keepalive socket parameter is a feature that allows the OS to automatically send "pings" in the socket to keep the socket open. You can have more information on this setting in the Tokio documentation.

You get this warning because setting this parameter is probably not available on your Ubuntu version. It works on mac os but not on CentOS for example.

if let Err(e) = socket.set_keepalive(Some(duration)) {
warn!("set_keepalive error; {}", e);
}

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants