Visualize clients going offline + Add mqtt connection details to config

This commit is contained in:
uwap 2017-11-04 00:24:48 +01:00
parent b2f1e2b07c
commit 964e3c0305
4 changed files with 13 additions and 3 deletions

View file

@ -23,4 +23,13 @@ export default function connectMqtt(url: string, store: Store<*,*>) {
}
});
});
client.on("offline", () => {
store.dispatch({ type: null });
});
client.on("close", () => {
store.dispatch({ type: null });
});
client.on("reconnect", () => {
store.dispatch({ type: null });
});
}