Merge pull request #1330 from Blockdaemon/nyet-increase-download-register-timeout-PR1

Increase download register timeout
pull/1337/head
Leo Chen 5 years ago committed by GitHub
commit dd0b760c38
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      api/service/syncing/downloader/client.go

@ -74,7 +74,7 @@ func (client *Client) GetBlocks(hashes [][]byte) *pb.DownloaderResponse {
// Register will register node's ip/port information to peers receive newly created blocks in future
// hash is the bytes of "ip:port" string representation
func (client *Client) Register(hash []byte, ip, port string) *pb.DownloaderResponse {
ctx, cancel := context.WithTimeout(context.Background(), 3*time.Second)
ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second)
defer cancel()
request := &pb.DownloaderRequest{Type: pb.DownloaderRequest_REGISTER}
request.PeerHash = make([]byte, len(hash))

Loading…
Cancel
Save