The server is not guaranteed to have closed the channel before we try to close it.
merge bug25881 into stable
stable to default