mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 16:43:31 +01:00
Fix shards not respawning on exit
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user