wait for each publish clients

This commit is contained in:
chrislu
2024-01-28 14:27:32 -08:00
parent b6c5e57c30
commit a297247137

View File

@@ -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
}