Clear the timeouts when the connection closes

https://bugzilla.mozilla.org/show_bug.cgi?id=1068667