-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #17 from andig/fix/races
Fix races in accessing connection and builder
- Loading branch information
Showing
3 changed files
with
48 additions
and
36 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,11 @@ | ||
package rct; | ||
package rct | ||
|
||
// Errors caused by a malformed or unexpected packet, which can be potentially be recovered by retrying the transmission | ||
type RecoverableError struct { | ||
Err string | ||
Err string | ||
} | ||
|
||
// Prints error to string | ||
func (e RecoverableError) Error() string { | ||
return e.Err | ||
} | ||
|
||
// Returns true if the given error is potentially recoverable | ||
func IsRecoverableError(err error) bool { | ||
_, ok:=err.(RecoverableError) | ||
return ok | ||
return e.Err | ||
} |