Skip to content

Commit

Permalink
Add go 1.4 specific check for request timeout.
Browse files Browse the repository at this point in the history
  • Loading branch information
aaron42net committed Oct 18, 2016
1 parent d5a499b commit d523eed
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/fotomat/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (

const (
// FotomatVersion is updated by git-hooks/pre-commit
FotomatVersion = "2.6.193"
FotomatVersion = "2.6.194"
)

var (
Expand Down
3 changes: 3 additions & 0 deletions thumbnail/proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,9 @@ func isTimeout(err error) bool {
if err, ok := err.Err.(net.Error); ok {
return err.Timeout()
}
if err.Err.Error() == "net/http: request canceled while waiting for connection" {
return true
}
}
return false
}

0 comments on commit d523eed

Please sign in to comment.