Skip to content

Commit

Permalink
make error messages on timeout more consistent
Browse files Browse the repository at this point in the history
  • Loading branch information
dimkr committed Jun 22, 2022
1 parent 22318de commit 389a6d8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,4 +115,4 @@ additional documentation and more details are available in `man gplaces`. type `
## Statistic
Language|files|blank|comment|code
:-------|-------:|-------:|-------:|-------:
C|1|236|58|1082
C|1|236|58|1083
3 changes: 2 additions & 1 deletion gplaces.c
Original file line number Diff line number Diff line change
Expand Up @@ -651,7 +651,8 @@ static int do_download(Selector *sel, SSL_CTX *ctx, const char *crtpath, const c
freeaddrinfo(result);

if (fd == -1) {
error(0, "cannot connect to `%s`:`%s`: %s", sel->host, sel->port, strerror(err));
if (errno == EINPROGRESS) error(0, "cannot connect to `%s`:`%s`: cancelled", sel->host, sel->port);
else error(0, "cannot connect to `%s`:`%s`: %s", sel->host, sel->port, strerror(err));
goto fail;
}

Expand Down

0 comments on commit 389a6d8

Please sign in to comment.