Skip to content

Commit

Permalink
Temporarly increase session RPC timeout.
Browse files Browse the repository at this point in the history
  • Loading branch information
jrick committed Sep 23, 2015
1 parent 33d053c commit 31d1526
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions chain/chain.go
Expand Up @@ -368,8 +368,13 @@ out:
// No notifications were received in the last 60s.
// Ensure the connection is still active by making a new
// request to the server.
// A 3 second timeout is used to prevent the handler loop
// from blocking here forever.
// TODO: A minute timeout is used to prevent the handler
// loop from blocking here forever, but this is much larger
// then it needs to be due to btcd processing websocket
// requests synchronously (see
// https://github.com/btcsuite/btcd/issues/504). Decrease
// this to something saner like 3s when the above issue is
// fixed.
type sessionResult struct {
err error
}
Expand All @@ -389,7 +394,7 @@ out:
}
pingChan = time.After(time.Minute)

case <-time.After(3 * time.Second):
case <-time.After(time.Minute):
log.Errorf("Timeout waiting for session RPC")
c.Stop()
break out
Expand Down

0 comments on commit 31d1526

Please sign in to comment.