There's also a kazillion things that can trigger a `window.onerror` like a thrown error in user code. This commit would just bluntly close the connection even if there isn't really a reason for it.