When a Recording created with JDK Flight Recorder's RecordingStream or RemoteRecordingStream is stopped or closed from an external source, the corresponding stream does not terminate as expected.
RecordingStream
If the associated Recording is stopped externally. RecordingStream stops as expected.
If the associated Recording is closed externally. RecordingStream does not stop.
RemoteRecordingStream
If the associated Recording is stopped externally. RemoteRecordingStream does not stop.
If the associated Recording is closed externally. RemoteRecordingStream also does not stop.
This leads to streams continuing to run indefinitely, even though their underlying recording has been stopped or closed.
RecordingStream
If the associated Recording is stopped externally. RecordingStream stops as expected.
If the associated Recording is closed externally. RecordingStream does not stop.
RemoteRecordingStream
If the associated Recording is stopped externally. RemoteRecordingStream does not stop.
If the associated Recording is closed externally. RemoteRecordingStream also does not stop.
This leads to streams continuing to run indefinitely, even though their underlying recording has been stopped or closed.