aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/web/src/components/System/Logs/Live.jsx5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/web/src/components/System/Logs/Live.jsx b/src/web/src/components/System/Logs/Live.jsx
index 2699a2e3..c572b2f9 100644
--- a/src/web/src/components/System/Logs/Live.jsx
+++ b/src/web/src/components/System/Logs/Live.jsx
@@ -20,6 +20,7 @@ class Live extends Component {
componentDidMount() {
const logsHub = createLogsHubConnection();
+ this.logsHub = logsHub;
logsHub.on('buffer', (buffer) => {
this.setState({
@@ -44,6 +45,10 @@ class Live extends Component {
logsHub.start();
}
+ componentWillUnmount() {
+ this.logsHub?.stop();
+ }
+
nextId = 0;
withId = (log) => ({ ...log, id: this.nextId++ });