If the host is not reachable connect don't return thus the program is locked. A non-blocking connect with a timer should be implemented.
Activity
gabri94 commentedon Jul 9, 2016
The problem appears only when the destination ip is not reachable at all. If it is reachable but the port is closed prince exits returning 0.