catch connectionalreadyclosed exceptions