Fixes an infinite loop on epool_wait() when bind() failed.

+ Factorisation of few error management lines.