Reset retryCount if the closing was clean.
Broadcast error on retrylimit.