diff options
| author | chrislu <chris.lu@gmail.com> | 2024-01-28 14:27:32 -0800 |
|---|---|---|
| committer | chrislu <chris.lu@gmail.com> | 2024-01-28 14:27:32 -0800 |
| commit | a297247137b2170e78cb798bc62dada11ba63b06 (patch) | |
| tree | acb52c062d4ddca9993012f6c2146530b321c15a | |
| parent | b6c5e57c30da55640c27783385589110fc8e08ee (diff) | |
| download | seaweedfs-a297247137b2170e78cb798bc62dada11ba63b06.tar.xz seaweedfs-a297247137b2170e78cb798bc62dada11ba63b06.zip | |
wait for each publish clients
| -rw-r--r-- | weed/mq/client/pub_client/publisher.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/weed/mq/client/pub_client/publisher.go b/weed/mq/client/pub_client/publisher.go index 2bf866395..c952bcfb6 100644 --- a/weed/mq/client/pub_client/publisher.go +++ b/weed/mq/client/pub_client/publisher.go @@ -10,7 +10,6 @@ import ( "google.golang.org/grpc/credentials/insecure" "log" "sync" - "time" ) type PublisherConfiguration struct { @@ -63,7 +62,10 @@ func (p *TopicPublisher) Shutdown() error { inputBuffer.CloseInput() } } - time.Sleep(1100 * time.Millisecond) + + for _, job := range p.jobs { + job.wg.Wait() + } return nil } |
