Skip to content

Conversation

@michaelortmann
Copy link
Member

@michaelortmann michaelortmann commented Oct 19, 2025

Found by: https://github.com/michaelortmann/
Patch by: https://github.com/michaelortmann/
Fixes:

One-line summary:
Enhance error logging for failed connect

Additional description (if needed):
Useful to relate log messages to each other and make it very clear what exactly failed
#1755 already enhanced logging, and this PR enhances it further
Propagate getsockopt error to errno error logging

Test cases demonstrating functionality (if applicable):
Before:

.jump localhost
[...]
[00:29:10] Failed connect to localhost (Connection refused ip 127.0.0.1 port 6667 )

.set prefer-ipv6 1

.jump localhost
[...]
[00:29:17] Failed connect to localhost (Connection refused ip ::1 port 6667 )

After:

.jump localhost
[...]
[00:55:29] Failed connect to localhost:6667 (Connection refused ip 127.0.0.1)

.set prefer-ipv6 1

.jump localhost
[...]
[00:55:36] Failed connect to localhost:6667 (Connection refused ip ::1)

Also getsockerrors like ENETUNREACH are properly propagated to error logging:

Before:

.jump unreachable
[...]
[01:07:48] Failed connect to unreachable (Operation now in progress ip 192.168.6.7 port 6667 )

After:

.jump unreachable
[...]
[01:08:29] Failed connect to unreachable:6667 (Network is unreachable ip 192.168.6.7 prefer-ipv6 0)

@michaelortmann michaelortmann changed the title Also log port for failed connect (WIP) Also log port for failed connect Oct 19, 2025
@michaelortmann michaelortmann changed the title (WIP) Also log port for failed connect Also log port for failed connect Oct 19, 2025
@vanosg vanosg added this to the v1.10.2 milestone Dec 20, 2025
@vanosg
Copy link
Member

vanosg commented Jan 24, 2026

Can you deconflict please?

@michaelortmann michaelortmann changed the title Also log port for failed connect Enhance error logging for failed connect Jan 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants