long to int conversion bug

From: Yuri Ushakov <>
Date: Thu, 4 Apr 2013 15:40:24 +0400

When really big timeouts were specified, do_multi_timeout() would return
negative values to Python code. Libcurl takes long and handles it well,
whereas pycurl corrupted the value.

That made tornado ( go into an essentially
infinite loop and stop serving incoming http requests, eating up all CPU

Tested on Python 2.6.5 and Tornado 2.0.0.

Received on 2013-04-04