Skip to content

connection refused vs time out on FreeBSD #483

@bagder

Description

@bagder

I run CI jobs on several different CI systems and Cirrus CI for the curl project and I'm right now working on a potential little change in how we handle timeouts during TCP connection.

A few of the tests we run attempts to do a TCP connect to 127.0.0.1 to a port number that isn't used - I've tried with 60000 and 2 and we want it to end with a connection refused which means that not service is listening on that port. Presumably, unless I do something, there is nothing listening on those ports.

The tool does a TCP connect. I want to verify that it handles a connection refused correctly.

But here's the thing: instead of connection refused, my connect attempts time out after 75 seconds on the Cirrus CI FreeeBSD machines.

I can't find any documentation explaining this nor how it can be changed. Can it be changed at all? Is there any TCP port that will result in connection refused? I'd love a little hint or pointer!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions