Corrected timeout handling example.