libmc icon indicating copy to clipboard operation
libmc copied to clipboard

use getsockopt to check connection state after poll indicate writable

Open MOON-CLJ opened this issue 7 years ago • 2 comments

MOON-CLJ avatar Jan 26 '19 05:01 MOON-CLJ

Could you add more details on why we need this? It'd would best if you could add a test case or a piece of POC code to reproduce the issue you want to fix.

mckelvin avatar Jan 30 '19 14:01 mckelvin

@mckelvin this pr contains two points,

1,as suggestion by https://man.openbsd.org/connect.2 ,also see the https://man.openbsd.org/connect.2#EXAMPLES 。 add getsockopt with option SO_ERROR after poll indicate ok to double check after connect。it's not easy to add a test。 2,again,add more log with connection's pointer address to expose connection's state。

MOON-CLJ avatar Jan 31 '19 03:01 MOON-CLJ