mirror of
https://github.com/danbulant/discord.js
synced 2026-05-30 12:51:55 +00:00
Fix shards not respawning on exit
This commit is contained in:
parent
527c729aca
commit
c6244ee6e1
1 changed files with 2 additions and 3 deletions
|
|
@ -78,7 +78,7 @@ class Shard extends EventEmitter {
|
|||
* @type {Function}
|
||||
* @private
|
||||
*/
|
||||
this._exitListener = this._handleExit.bind(this);
|
||||
this._exitListener = this._handleExit.bind(this, undefined);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -282,8 +282,7 @@ class Shard extends EventEmitter {
|
|||
* @param {boolean} [respawn=this.manager.respawn] Whether to spawn the shard again
|
||||
* @private
|
||||
*/
|
||||
_handleExit(respawn) {
|
||||
if (typeof respawn === 'undefined') respawn = this.manager.respawn;
|
||||
_handleExit(respawn = this.manager.respawn) {
|
||||
/**
|
||||
* Emitted upon the shard's child process exiting.
|
||||
* @event Shard#death
|
||||
|
|
|
|||
Loading…
Reference in a new issue