[#1442] Make sure closing the channel will not cause an UnsupportedOperationException