facebook/tornado — Issue #455: Inconsistency in the IOStream.closed method
Author: oyerli
Created: 2012-02-03 22:24:39+00:00
State: open

Hi,
The fix in the commit 501f596 caused a problem in my async web server application:
I expect IOStream.closed method to return true AS SOON AS the close_callback is called. (This was the previous behaviour since it was not waiting for the pending callbacks). Now, the closed() method returns true but the close_callback waits the pending callbacks to finish. Hence the connection is not actually closed. Is it the intended behaviour?

I expect the closed() method to return true after all pending callbacks finished AND the close_callback is called. Otherwise we cannot know if the connection is actually closed.