connection: Re-add debouncedReconnect
This commit is contained in:
parent
6fbb9463ee
commit
cd84feefff
@ -4,7 +4,7 @@ import u from '@converse/headless/utils/core';
|
||||
import { Strophe } from 'strophe.js/src/core';
|
||||
import { __ } from './i18n';
|
||||
import { _converse, api, clearSession, tearDown } from "./converse-core";
|
||||
import { isElement, noop } from 'lodash';
|
||||
import { debounce, isElement, noop } from 'lodash';
|
||||
|
||||
|
||||
const BOSH_WAIT = 59;
|
||||
@ -17,6 +17,11 @@ const BOSH_WAIT = 59;
|
||||
*/
|
||||
export class Connection extends Strophe.Connection {
|
||||
|
||||
constructor (service, options) {
|
||||
super(service, options);
|
||||
this.debouncedReconnect = debounce(this.reconnect, 2000);
|
||||
}
|
||||
|
||||
static generateResource () {
|
||||
return `/converse.js-${Math.floor(Math.random()*139749528).toString()}`;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user