def messageReceived(self, message):
        # Ignore empty messages
        if not message or not self.session:
            return

        try:
            msg = proto.json_decode(message)

            if isinstance(msg, list):
                self.session.messagesReceived(msg)
            else:
                self.session.messagesReceived((msg,))
        except Exception as e:
            log.msg('WebSocketTransport.messageReceived: %r' % e)

            # Close running connection
            self.transport.loseConnection()
dataset/ETHPy150Open flaviogrossi/sockjs-cyclone/sockjs/cyclone/transports/websocket.py/WebSocketTransport.messageReceived/original