File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -133,6 +133,7 @@ func (w *exposureWriter) start() {
133133 if r := recover (); r != nil {
134134 log .Error ("openfeature: exposure writer recovered panic: %v" , r )
135135 }
136+ w .stop ()
136137 }()
137138
138139 for {
@@ -243,8 +244,6 @@ func (w *exposureWriter) buildRequestURL() string {
243244
244245// stop stops the exposure writer and flushes any remaining events
245246func (w * exposureWriter ) stop () {
246- w .flush ()
247-
248247 w .mu .Lock ()
249248 if w .stopped {
250249 w .mu .Unlock ()
Original file line number Diff line number Diff line change @@ -196,6 +196,7 @@ func (p *DatadogProvider) ShutdownWithContext(ctx context.Context) error {
196196 err := stopRemoteConfig ()
197197 // Stop the exposure writer
198198 if p .exposureWriter != nil {
199+ p .exposureWriter .flush ()
199200 p .exposureWriter .stop ()
200201 }
201202 done <- err
You can’t perform that action at this time.
0 commit comments