-
Notifications
You must be signed in to change notification settings - Fork 252
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
cae1610
commit e4a2374
Showing
40 changed files
with
2,060 additions
and
320 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,13 @@ | ||
//go:build darwin || freebsd || linux || openbsd | ||
|
||
package upstream | ||
|
||
import ( | ||
"github.com/AdguardTeam/golibs/errors" | ||
"golang.org/x/sys/unix" | ||
) | ||
|
||
func (p *dnsOverTLS) isConnBroke(err error) (ok bool) { | ||
// isConnBroken returns true if err means that a connection is broken. | ||
func isConnBroken(err error) (ok bool) { | ||
return errors.Is(err, unix.EPIPE) || errors.Is(err, unix.ETIMEDOUT) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
//go:build windows | ||
|
||
package upstream | ||
|
||
import ( | ||
"github.com/AdguardTeam/golibs/errors" | ||
"golang.org/x/sys/windows" | ||
) | ||
|
||
// isConnBroken always returns false. | ||
func isConnBroken(err error) (ok bool) { | ||
return errors.Is(err, windows.WSAECONNABORTED) | ||
} |
Oops, something went wrong.