Fixed closed channel exceptions on openjdk.