mirror of
https://github.com/samsonjs/retrogit.git
synced 2026-04-14 12:46:02 +00:00
Increase HTTP request deadline.
This commit is contained in:
parent
d6bd445caa
commit
9db7f04c72
2 changed files with 2 additions and 1 deletions
|
|
@ -629,6 +629,7 @@ func digestAdminHandler(w http.ResponseWriter, r *http.Request) {
|
|||
|
||||
func githubOAuthTransport(c appengine.Context) *oauth.Transport {
|
||||
appengineTransport := &urlfetch.Transport{Context: c}
|
||||
appengineTransport.Deadline = time.Second * 60
|
||||
cachingTransport := &CachingTransport{
|
||||
Transport: appengineTransport,
|
||||
Context: c,
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ func computeVintage(c appengine.Context, userId int, userLogin string, repoId in
|
|||
Author: userLogin,
|
||||
Until: beforeCreationTime,
|
||||
})
|
||||
if response.StatusCode == 409 {
|
||||
if response != nil && response.StatusCode == 409 {
|
||||
// GitHub returns with a 409 when a repository is empty.
|
||||
commits = make([]github.RepositoryCommit, 0)
|
||||
} else if err != nil {
|
||||
|
|
|
|||
Loading…
Reference in a new issue