mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-07-31 21:26:23 +08:00
separate context
If using the same context, the downstream grpc would be cancelled when the parent grpc is cancelled.
This commit is contained in:
parent
f67c8309d8
commit
17806cde2a
@ -67,7 +67,7 @@ func (b *MessageQueueBroker) PublishMessage(stream mq_pb.SeaweedMessaging_Publis
|
||||
// connect to follower brokers
|
||||
if localTopicPartition.FollowerStream == nil && len(initMessage.FollowerBrokers) > 0 {
|
||||
follower := initMessage.FollowerBrokers[0]
|
||||
ctx := stream.Context()
|
||||
ctx := context.Background()
|
||||
localTopicPartition.FollowerGrpcConnection, err = pb.GrpcDial(ctx, follower, true, b.grpcDialOption)
|
||||
if err != nil {
|
||||
response.Error = fmt.Sprintf("fail to dial %s: %v", follower, err)
|
||||
|
Loading…
Reference in New Issue
Block a user