socket: whitelist `connect_error` and `connect_timeout`