discord.js: Error: socket hang up happens when the bot joins/leaves a server

Please describe the problem you are having in as much detail as possible:

  throw er; // Unhandled 'error' event
  ^
  Error: socket hang up
     at createHangUpError (_http_client.js:343:15)
     at TLSSocket.socketOnEnd (_http_client.js:435:23)
     at emitNone (events.js:110:20)
     at TLSSocket.emit (events.js:207:7)
     at endReadableNT (_stream_readable.js:1045:12)
     at _combinedTickCallback (internal/process/next_tick.js:102:11)
     at process._tickCallback (internal/process/next_tick.js:161:9)

this error happen often in the last time when my Bot joins or leaves a server and it should not be an issue with my code/internet connection of my bots VPS.

Further details:

  • discord.js version: 11.1
  • node.js version: 8.1.4
  • Operating system: Ubuntu
  • Priority this issue should have – please be realistic and elaborate if possible: medium because it happen pretty often and a bot should not crash every 6 hours 🤔
  • I found this issue while running code on a user account
  • I have also tested the issue on latest master, commit hash:

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 26 (10 by maintainers)

Most upvoted comments

its your network, sorry to disappoint.

I’ve been getting the same issue as well, I highly doubt it’s my network… Please re-open this issue @Dev-Yukine it’s causing some serious problems.

I’ve also gotten a ton of this lately for no reason. No code has been changed. And it causes shards to become unresponsive.

Weird that two separate hosts are having the same issue with something that I don’t have an issue with in Eris. :Thonk:

On Wed, Oct 4, 2017, 4:06 PM PassTheMayo notifications@github.com wrote:

Oh

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/hydrabolt/discord.js/issues/1707#issuecomment-334273582, or mute the thread https://github.com/notifications/unsubscribe-auth/ATSBrDjfN1TYFyCzQifoTYZe6V4RrQtAks5so-UxgaJpZM4Of346 .