mirror of
https://github.com/fazo96/ipfs-boards
synced 2025-01-10 12:24:20 +01:00
fix missing cleanup
This commit is contained in:
parent
6685340b42
commit
359152ad02
@ -24,8 +24,11 @@ module.exports = React.createClass({
|
||||
}
|
||||
} else this.startTimer()
|
||||
},
|
||||
componentWillUnmount: function () {
|
||||
if (this.timer) clearTimeout(this.timer)
|
||||
},
|
||||
startTimer: function () {
|
||||
setTimeout(_ => {
|
||||
this.timer = setTimeout(_ => {
|
||||
console.log('Connection to go-ipfs has timed out (probably due to CORS)')
|
||||
if (this.isMounted()) this.setState({ long: true })
|
||||
}, 5000)
|
||||
|
Loading…
Reference in New Issue
Block a user