#3897 IoStream.closed called in finally of try