Skip to content
Snippets Groups Projects
Commit 20908b30 authored by Marcin Janczyk's avatar Marcin Janczyk
Browse files

Detect connection refused errors during API test on Windows


The first run does not try to connect to API, as an address is not
yet saved in configuration. The second run did not recognize
corrently a refused connection.

Fixes #1661.

License: MIT
Signed-off-by: default avatarMarcin Janczyk <marcinjanczyk@gmail.com>
parent 9c6ec296
Branches
No related tags found
1 merge request!1New
......@@ -668,5 +668,6 @@ func apiClientForAddr(addr ma.Multiaddr) (cmdsHttp.Client, error) {
}
func isConnRefused(err error) bool {
return strings.Contains(err.Error(), "connection refused")
return strings.Contains(err.Error(), "connection refused") ||
strings.Contains(err.Error(), "target machine actively refused it")
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment