kernelsauce / turbo

Turbo is a framework built for LuaJIT 2 to simplify the task of building fast and scalable network applications. It uses a event-driven, non-blocking, no thread design to deliver excellent performance and minimal footprint to high-load applications while also providing excellent support for embedded uses.
http://turbo.readthedocs.io/
Apache License 2.0
528 stars 84 forks source link

ioloop: Do not index cleared interval #261

Closed mniestroj closed 8 years ago

mniestroj commented 8 years ago

After running interval callback we issued set_last_call() on proecessed interval. However, when we cleared interval inside its callback, we got nil value inside _intervals table which caused indexing nil value during set_last_call().

Assign Interval instanse to local variable, so we can safely issue set_last_call() on it.

kernelsauce commented 8 years ago

Wow, thanks for catching that one. Definitely not thought through when made.