Make sure exceptions on close are observed for websockets.

#1846
Merge branch 'release' into dev