Fix set timeout method

0 to disable timeout for ioloop