Exit time travel mode as a part of the app shutdown().

This commit is contained in:
Filip Barl
2017-08-10 16:36:33 +02:00
parent f19e4c55cd
commit 0c7896222c
2 changed files with 10 additions and 9 deletions

View File

@@ -798,10 +798,16 @@ export function changeInstance() {
}
export function shutdown() {
stopPolling();
teardownWebsockets();
return {
type: ActionTypes.SHUTDOWN
return (dispatch) => {
stopPolling();
teardownWebsockets();
// Exit the time travel mode before unmounting the app.
dispatch({
type: ActionTypes.RESUME_TIME
});
dispatch({
type: ActionTypes.SHUTDOWN
});
};
}