fix(netxlite/errorsx): map "use of closed network connection" (#510)

Part of https://github.com/ooni/probe/issues/1733 and diff has been
extracted from https://github.com/ooni/probe-cli/pull/506.
This commit is contained in:
Simone Basso 2021-09-27 14:40:25 +02:00 committed by GitHub
commit d7b9c8f0a8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 21 additions and 8 deletions

View file

@ -90,6 +90,9 @@ func classifyWithStringSuffix(err error) string {
// that we return here is significantly more specific.
return FailureDNSNXDOMAINError
}
if strings.HasSuffix(s, "use of closed network connection") {
return FailureConnectionAlreadyClosed
}
return "" // not found
}