@ -118,6 +118,8 @@ func (t *TwitchPubSub) Close() error {
t.listening = nil
}
t.Lock()
if t.wsConn != nil {
// To cleanly close a connection, a client should send a close
// frame and wait for the server to close the connection.