Tornado 2.1.1 新特性¶

Oct 4, 2011¶

Bug fixes¶

  • Fixed handling of closed connections with the epoll (i.e. Linux)IOLoop. Previously, closed connections could be shut down too early,which most often manifested as “Stream is closed” exceptions inSimpleAsyncHTTPClient.
  • Fixed a case in which chunked responses could be closed prematurely,leading to truncated output.
  • IOStream.connect now reports errors more consistently via loggingand the close callback (this affects e.g. connections to localhoston FreeBSD).
  • IOStream.read_bytes again accepts both int and long arguments.
  • PeriodicCallback no longer runs repeatedly when IOLoop iterationscomplete faster than the resolution of time.time() (mainly a problemon Windows).

Backwards-compatibility note¶

  • Listening for IOLoop.ERROR alone is no longer sufficient for detectingclosed connections on an otherwise unused socket. IOLoop.ERROR mustalways be used in combination with READ or WRITE.

原文:

https://tornado-zh-cn.readthedocs.io/zh_CN/latest/releases/v2.1.1.html