Revert "Merge pull request #1017 from Gozala/bug/websocket@820953"

This reverts commit 3f003b71587b0ab399394f73c161c50249ca0994, reversing
changes made to ec3ee82d616a74d78376ea5b2f726fd45b66db4e.