add curl error code to async event

Signed-off-by: xiehuc <xiehuc@gmail.com>
check valid before poll lost

Signed-off-by: xiehuc <xiehuc@gmail.com>