Remove ws ready state workaround.
Emit 'close' signal when socket closes.