diff --git a/lib/_debug_agent.js b/lib/_debug_agent.js index b20a960fdaaece..3457c6db8ac9d6 100644 --- a/lib/_debug_agent.js +++ b/lib/_debug_agent.js @@ -96,9 +96,8 @@ function Client(agent, socket) { this.on('data', this.onCommand); - var self = this; - this.socket.on('close', function() { - self.destroy(); + this.socket.on('close', () => { + this.destroy(); }); } util.inherits(Client, Transform);