Runs the main loop

        Arguments:
            stop_event: threading.Event() as a stop signal

def _runForever(self, stop_event):
        """Runs the main loop

        Arguments:
            stop_event: threading.Event() as a stop signal
        """
        while(not stop_event.is_set()):
            state = self.pusher.connection.state

            if (state is not "connecting" and
                    state is not "connected"):
                self.logger.warning(
                    "Pusher seems to be disconnected, trying to reconnect")
                self.pusher.connect()

            stop_event.wait(0.5)