Merge "Do not crash when server channel has closed" into main