curl / Mailing Lists / curl-users / Single Mail


Re: curl get stuck when connect to and from the same ip/port

From: Daniel Stenberg <>
Date: Wed, 31 Oct 2018 23:03:43 +0100 (CET)

On Wed, 31 Oct 2018, 王岩 wrote:

> A workaround is set timeout(-m) to the curl command, but I still think this
> behaviour is strange and causes unexpected behaviour. I will appreciate if
> anyone could give some insight about this issue.

This is a side-effect of how port numbers and TCP works. It is also a reason
why you often run servers on port numbers that aren't included in the "random
pool range" that is used for source address when you connect with TCP.


Received on 2018-10-31