Wouldn't be `-1 != cli->sock' since socket() will return an non-negative number?

Regards!