mirror of https://github.com/MISP/misp-dashboard
fix: Force closing the connection before trying to reconnect
parent
c1a2d17bbf
commit
194b28ea93
|
@ -23,7 +23,7 @@ class MapEvent {
|
||||||
this.specifName = json.specifName;
|
this.specifName = json.specifName;
|
||||||
this.cityName = json.cityName;
|
this.cityName = json.cityName;
|
||||||
this.text = this.categ + ": " + this.value;
|
this.text = this.categ + ": " + this.value;
|
||||||
let underText = "";
|
let underText = "";
|
||||||
if (this.specifName !== null && this.cityName !== null) {
|
if (this.specifName !== null && this.cityName !== null) {
|
||||||
underText = this.specifName+", "+this.cityName;
|
underText = this.specifName+", "+this.cityName;
|
||||||
} else if (this.specifName !== null) {
|
} else if (this.specifName !== null) {
|
||||||
|
@ -225,6 +225,7 @@ function connect_source_map() {
|
||||||
};
|
};
|
||||||
source_map.onerror = function(){
|
source_map.onerror = function(){
|
||||||
console.log('error: '+source_map.readyState);
|
console.log('error: '+source_map.readyState);
|
||||||
|
source_map.close()
|
||||||
setTimeout(function() { connect_source_map(); }, 5000);
|
setTimeout(function() { connect_source_map(); }, 5000);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue