kord icon indicating copy to clipboard operation
kord copied to clipboard

Use gateway url provided in `Ready` event for resuming

Open lukellmann opened this issue 2 years ago • 9 comments

relevant doc commits:

  • https://github.com/discord/discord-api-docs/commit/30b37e576d3457f5401c50dea96e8bc5bfdd675b
  • https://github.com/discord/discord-api-docs/commit/58d6ec4ba99018c2fc104428c0309081b14d9fb3

lukellmann avatar Aug 11 '22 16:08 lukellmann

I reviewed the PR a second time and it looks fine; but it's a draft so I'll be waiting til it's complete

HopeBaron avatar Aug 13 '22 10:08 HopeBaron

I made it a draft because of this concern:

I think it might be necessary to reset the context on some other Close events, e.g. UserClose (resuming after the user stopped the gateway seems wrong). I'm new to gateway code, so I might be wrong here, what do you think?

But if you say this isn't needed, then this PR is ready.

lukellmann avatar Aug 13 '22 12:08 lukellmann

The resume will not need to modify anything because the reset or not is handled by the loop conditions all what changed in this PR is where should we connect on resumes not how we should connect so I guess we are good to go if you have tested it and left the bot running for a bit with, say "turn on turn off network to test how would that go

HopeBaron avatar Aug 13 '22 16:08 HopeBaron

Problem is that I can't really test rn because they only send the default url until September 12 (which means we connect to the same as normal until then).

lukellmann avatar Aug 13 '22 16:08 lukellmann

In that case guess there is no need to rush and merge as this may be subject to change

HopeBaron avatar Aug 13 '22 17:08 HopeBaron

Converted this back to a draft for now

lukellmann avatar Aug 16 '22 21:08 lukellmann

I checked rn, I'm still not receiving a session-specific URL. Will try again later today/tomorrow.

lukellmann avatar Sep 12 '22 13:09 lukellmann

I checked rn, I'm still not receiving a session-specific URL. Will try again later today/tomorrow.

Still no luck... 😞

lukellmann avatar Sep 13 '22 23:09 lukellmann

Still nothing, what should we do?

lukellmann avatar Sep 18 '22 15:09 lukellmann

I was finally able to receive a different url and test it - seems to work as intended

lukellmann avatar Oct 04 '22 16:10 lukellmann