What @rgarcia said is correct. Lines 30 and 31 are both synchronous so anything waiting on the event loop cannot be called in between them.