mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-18 12:33:30 +01:00
Fix shards not respawning on exit
This commit is contained in:
@@ -78,7 +78,7 @@ class Shard extends EventEmitter {
|
|||||||
* @type {Function}
|
* @type {Function}
|
||||||
* @private
|
* @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
|
* @param {boolean} [respawn=this.manager.respawn] Whether to spawn the shard again
|
||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
_handleExit(respawn) {
|
_handleExit(respawn = this.manager.respawn) {
|
||||||
if (typeof respawn === 'undefined') respawn = this.manager.respawn;
|
|
||||||
/**
|
/**
|
||||||
* Emitted upon the shard's child process exiting.
|
* Emitted upon the shard's child process exiting.
|
||||||
* @event Shard#death
|
* @event Shard#death
|
||||||
|
|||||||
Reference in New Issue
Block a user