junkurihara/rust-rpxy

cargo build failed

kak-smko opened this issue · 2 comments

Hi
When I try run cargo build I got this errors

Screenshot 2024-02-21 173509

How can I fix it?

Hi @kak-smko

I guess you tried on Windows. The APIs set_reuse_port in tokio works on UNIX-like systems (c.f., https://docs.rs/tokio/1.36.0/tokio/net/struct.TcpSocket.html#method.set_reuseport ).

If you are on Windows, I think it works by deleting L18 and L36. These are required to re-bind ports after reloading the configuration without restarting the process. So it works without these options, and please restart the process when you update the configuration.

thanks.

Hi @kak-smko

I guess you tried on Windows. The APIs set_reuse_port in tokio works on UNIX-like systems (c.f., https://docs.rs/tokio/1.36.0/tokio/net/struct.TcpSocket.html#method.set_reuseport ).

If you are on Windows, I think it works by deleting L18 and L36. These are required to re-bind ports after reloading the configuration without restarting the process. So it works without these options, and please restart the process when you update the configuration.

Thank you