C: simple_socket add check return value from listen