libmc
libmc copied to clipboard
use getsockopt to check connection state after poll indicate writable
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 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。