File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -644,6 +644,7 @@ def pop(self):
644644 spans = DummyWriterMixin .pop (self )
645645 if self ._trace_flush_enabled :
646646 flush_test_tracer_spans (self )
647+ self ._inner_writer .before_fork ()
647648 return spans
648649
649650 def recreate (self , appsec_enabled : Optional [bool ] = None ) -> "DummyWriter" :
@@ -745,6 +746,9 @@ def get_spans(self):
745746 def pop (self ):
746747 # type: () -> List[Span]
747748 spans = self ._span_aggregator .writer .pop ()
749+ # Stop the writer threads in case the writer is no longer used.
750+ # Otherwise we risk accumulating threads and file descriptors causing crashes
751+ # In case the writer is used again it will be restarted by native side.
748752 return spans
749753
750754 def pop_traces (self ):
You can’t perform that action at this time.
0 commit comments