|
@@ -111,17 +111,15 @@ start:
|
|
if ok {
|
|
if ok {
|
|
if statusCode.Code() == codes.Unauthenticated {
|
|
if statusCode.Code() == codes.Unauthenticated {
|
|
return nil, err
|
|
return nil, err
|
|
- } else if statusCode.Code() == codes.Unavailable {
|
|
|
|
|
|
+ } else {
|
|
log.Println("Retrying stream")
|
|
log.Println("Retrying stream")
|
|
for {
|
|
for {
|
|
- time.Sleep(time.Second * 1)
|
|
|
|
|
|
+ time.Sleep(time.Second * 3)
|
|
err := s.assignStream()
|
|
err := s.assignStream()
|
|
if err == nil {
|
|
if err == nil {
|
|
goto start
|
|
goto start
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- } else {
|
|
|
|
- return nil, err
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|