polling icon indicating copy to clipboard operation
polling copied to clipboard

Fix: replace is_connect_failed with is_err

Open irvingoujAtDevolution opened this issue 1 year ago • 4 comments

In linux, epoll, EPOLLHUP may happen even if no connection call is made. It would confuse callers for what is actually happening. Replaced is_connect_failed, and we detect if connection failed by using the combination of is_err and is_interrupt, please see the example, tcp_client

irvingoujAtDevolution avatar Feb 07 '24 17:02 irvingoujAtDevolution

Unfortunately we can't change is_connect_failed as that would be a breaking change. So we have to keep the name the same there.

I apologize for my previous mistake. I would like to have your opinion on whether it is better to add is_err, mark is_connect_fail as deprecated, or simply keep using the same name but change the implementation.

I would argue that the first approach is better, as it aligns with the semantics it provides.

irvingoujAtDevolution avatar Feb 07 '24 20:02 irvingoujAtDevolution

I apologize for my previous mistake. I would like to have your opinion on whether it is better to add is_err, mark is_connect_fail as deprecated, or simply keep using the same name but change the implementation.

I would argue that the first approach is better, as it aligns with the semantics it provides.

I'd argue that the first would be better.

notgull avatar Feb 10 '24 17:02 notgull

please have a look again, I am not exactly sure if this is how you want it.

irvingoujAtDevolution avatar Feb 29 '24 14:02 irvingoujAtDevolution

😢 , @notgull could you please help me look at the wine CI thing? I have no idea how that works

irvingoujAtDevolution avatar Mar 20 '24 18:03 irvingoujAtDevolution

Looks like a spurious error.

notgull avatar Mar 21 '24 05:03 notgull