mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-17 14:04:52 +02:00
kitten @: Fix a regression connecting to TCP sockets using plain IP addresses rather than hostnames
Fixes #7794
This commit is contained in:
@@ -174,8 +174,10 @@ func do_socket_io(io_data *rc_io_data) (serialized_response []byte, err error) {
|
||||
}
|
||||
defer f.Close()
|
||||
} else {
|
||||
conn, err = net.Dial(global_options.to_network, global_options.to_address)
|
||||
network := utils.IfElse(global_options.to_network == "ip", "tcp", global_options.to_network)
|
||||
conn, err = net.Dial(network, global_options.to_address)
|
||||
if err != nil {
|
||||
err = fmt.Errorf("Failed to connect to %s %s with error: %w", network, global_options.to_address, err)
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user