Revert "Merge pull request #1049 from Gozala/bug/websocket@820953" for causing test failures

This reverts commit a3aa373b4d4ae110318d1fd4a37b60f0232a715f, reversing
changes made to 5d5aa58a47293c3d23f80c0a66784ba0aa4a6cba.