Skip to content

SeaweedFS is a distributed storage system for object storage (S3), file systems, Iceberg table buckets, and Lance vector buckets, designed to handle billions of files with O(1) disk access and effortless horizontal scaling.

grpc add PermitWithoutStream to client and server options

Chris Lu37a3628b2e9d
diff --git a/weed/util/grpc_client_server.go b/weed/util/grpc_client_server.go
index 4dace5e8bb..dc896ccb44 100644
--- a/weed/util/grpc_client_server.go
+++ b/weed/util/grpc_client_server.go
@@ -30,6 +30,7 @@ func NewGrpcServer(opts ...grpc.ServerOption) *grpc.Server {
Timeout: 20 * time.Second, // ping timeout
}), grpc.KeepaliveEnforcementPolicy(keepalive.EnforcementPolicy{
MinTime: 60 * time.Second, // min time a client should wait before sending a ping
+ PermitWithoutStream: true,
}))
for _, opt := range opts {
if opt != nil {
@@ -48,6 +49,7 @@ func GrpcDial(ctx context.Context, address string, opts ...grpc.DialOption) (*gr
grpc.WithKeepaliveParams(keepalive.ClientParameters{
Time: 30 * time.Second, // client ping server if no activity for this long
Timeout: 20 * time.Second,
+ PermitWithoutStream: true,
}))
for _, opt := range opts {
if opt != nil {