Upgrade with async leads to infinite onDataAvailable

2018-07-25 Thread Sergey Mashkov
Hi I am facing problem in the following scenario: In response to an upgrade request I do upgrade, get WebConnection instance, take UpgradedServletInputStream from it As far it is a usual ServletInputStream I set ReadListener on it. It works almost properly so I didn't notice it for long. Now I

UpgradedServletInputStream.read EOF

2017-10-09 Thread Sergey Mashkov
Hi Could anybody explain me why UpgradedServletInputStream does fail with EOFException in non-blocking mode instead of returning -1 ? Where can I find exact Servlet API specification about this async API behaviour? java.io.EOFException at

Tomcat 9: UpgradedServletOutputStream

2017-08-11 Thread Sergey Mashkov
Hi everyone I am experiencing race condition: from time to time when I cann to UpgradedServletOutputStream.setWriteListener(myCallback) servlet container doesn't invoke neither myCallback.onWritePossible() nor .onError. I believe the reason is that setWriteListener() method implementation sets

Re: setWriteListener and async operations concurrency

2016-10-27 Thread Sergey Mashkov
On Thu, Oct 27, 2016 at 2:19 PM André Warnier (tomcat) <a...@ice-sa.com> wrote: > On 27.10.2016 12:15, Sergey Mashkov wrote: > > Hi > > > > I am experiencing deadlock when trying to set output stream write > listener: > > The thread from my own thread pool i

setWriteListener and async operations concurrency

2016-10-27 Thread Sergey Mashkov
Hi I am experiencing deadlock when trying to set output stream write listener: The thread from my own thread pool is trying to set a write listener (my code via setWriteListener call) and another one thread is https-jsse-nio-N-exec is trying to close and flush (there is no my code in the stack