mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-09-19 22:47:56 +08:00
fix timeout issue, but can not reproduce with local built binaries
fix https://github.com/chrislusf/seaweedfs/issues/841
This commit is contained in:
@@ -25,8 +25,8 @@ func NewGrpcServer() *grpc.Server {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func GrpcDial(address string, opts ...grpc.DialOption) (*grpc.ClientConn, error) {
|
func GrpcDial(address string, opts ...grpc.DialOption) (*grpc.ClientConn, error) {
|
||||||
opts = append(opts, grpc.WithBlock())
|
// opts = append(opts, grpc.WithBlock())
|
||||||
opts = append(opts, grpc.WithTimeout(time.Duration(5*time.Second)))
|
// opts = append(opts, grpc.WithTimeout(time.Duration(5*time.Second)))
|
||||||
opts = append(opts, grpc.WithInsecure())
|
opts = append(opts, grpc.WithInsecure())
|
||||||
opts = append(opts, grpc.WithKeepaliveParams(keepalive.ClientParameters{
|
opts = append(opts, grpc.WithKeepaliveParams(keepalive.ClientParameters{
|
||||||
Time: 30 * time.Second, // client ping server if no activity for this long
|
Time: 30 * time.Second, // client ping server if no activity for this long
|
||||||
|
Reference in New Issue
Block a user