[ 
https://issues.apache.org/jira/browse/CXF-9118?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17935492#comment-17935492
 ] 

Ralph B commented on CXF-9118:
------------------------------

Thank you for looking into the issue. I have looked at the pull request #2317, 
and I have a question.
In CXF there is only single instance Timer "DelayedCachedOutputStreamCleaner" 
in an application from what I now see.


The single instance Timer is triggered at fixed interval, and it calls the 
clean() method, and that calls close() for all. 

A new young Closeable in a CachedOutputStream that is just registered before 
the Timer is triggered, would be prematurely closed, don't you think?  

 
{code:java}
private void clean(Collection<DelayedCloseable> closeables) {
  while (iterator.hasNext()) {
    final DelayedCloseable next = iterator.next();
    // ...
    next.closeable.close();
  }
}{code}
 

 

> DelayedCachedOutputStreamCleaner may expire streams prematurely
> ---------------------------------------------------------------
>
>                 Key: CXF-9118
>                 URL: https://issues.apache.org/jira/browse/CXF-9118
>             Project: CXF
>          Issue Type: Bug
>    Affects Versions: 3.5.11, 3.6.6, 4.0.7, 4.1.1
>            Reporter: Andriy Redko
>            Assignee: Andriy Redko
>            Priority: Major
>             Fix For: 4.1.2, 4.0.8, 3.6.7, 3.5.12
>
>
> See please https://lists.apache.org/thread/hcd44sjzc650x0zqomh9wkkvvcbjwbpb



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to