Commit graph

29 commits

Author SHA1 Message Date
e52a3282e0 discord-ws: Fix resume url
All checks were successful
ci/woodpecker/push/java Pipeline was successful
ci/woodpecker/push/oci-image-build Pipeline was successful
The resume url needs to use the same version and encoding as the initial
connection used to.
2024-12-18 17:19:35 +01:00
5672f174ec misc: Make params final
All checks were successful
ci/woodpecker/push/java Pipeline was successful
ci/woodpecker/push/oci-image-build Pipeline was successful
2024-12-15 19:40:36 +01:00
137d3ede04 discord-ws: Fix heartbeat timing
All checks were successful
ci/woodpecker/push/java Pipeline was successful
ci/woodpecker/push/oci-image-build Pipeline was successful
Wait til sending complets and then start the sleep.
2024-12-15 13:05:17 +01:00
ed79486d73 discord-ws: Close connection on reconect and invalid session 2024-12-15 13:05:17 +01:00
e552f8ee58 discord-ws: Fix time based retry reset
All checks were successful
ci/woodpecker/push/java Pipeline was successful
ci/woodpecker/push/oci-image-build Pipeline was successful
2024-12-09 23:56:31 +01:00
95dcbf99be discord-ws: Add logging on ops actions
All checks were successful
ci/woodpecker/push/java Pipeline was successful
ci/woodpecker/push/oci-image-build Pipeline was successful
2024-12-09 21:26:40 +01:00
9a9580cb87 discord-ws: Reconnect on error
All checks were successful
ci/woodpecker/push/java Pipeline was successful
ci/woodpecker/push/oci-image-build Pipeline was successful
We should if the connection is reseted by peer due to a network problem
reconnect with authentication.
2024-12-07 21:56:50 +01:00
01738a5f0a discord-ws: Fix to reconnect on 1000-1006 error codes
All checks were successful
ci/woodpecker/push/java Pipeline was successful
ci/woodpecker/push/oci-image-build Pipeline was successful
ci/woodpecker/manual/java Pipeline was successful
ci/woodpecker/manual/oci-image-build Pipeline was successful
2024-12-04 23:14:03 +01:00
5c16c60782 misc: Cleanup 2024-12-04 20:32:46 +01:00
ab51cfb0c5 discrod-ws: Improve BackoffRetryer
All checks were successful
ci/woodpecker/push/java Pipeline was successful
ci/woodpecker/push/oci-image-build Pipeline was successful
Move static fields into usage since they wher only used once.
Add logging on retry reset.
2024-12-04 20:24:26 +01:00
55eb8bb081 discord-ws: Fix missing final 2024-12-04 20:19:29 +01:00
9a646b9e8d discord-ws: Extract resume logic into own class
All checks were successful
ci/woodpecker/push/java Pipeline was successful
ci/woodpecker/push/oci-image-build Pipeline was successful
2024-12-04 20:03:08 +01:00
d41570bf55 discord-ws: Improve retry 2024-12-04 19:56:33 +01:00
7e9dbe8bd5 discord-ws: Reset retry count after 5 minutes without retry
All checks were successful
ci/woodpecker/push/java Pipeline was successful
ci/woodpecker/push/oci-image-build Pipeline was successful
2024-12-03 00:28:32 +01:00
431433b05d discord-ws: Fix resuming on < 4000 status codes
All checks were successful
ci/woodpecker/push/java Pipeline was successful
ci/woodpecker/push/oci-image-build Pipeline was successful
2024-12-03 00:01:28 +01:00
e310be167c discord-ws: Improve heartbeat logging
All checks were successful
ci/woodpecker/push/java Pipeline was successful
ci/woodpecker/push/oci-image-build Pipeline was successful
Log with thread name of the async heartbeat virtual thread.
2024-12-02 23:54:52 +01:00
a51dcf7e1f discord-ws: Improve heartbeat thread handling
All checks were successful
ci/woodpecker/push/java Pipeline was successful
ci/woodpecker/push/oci-image-build Pipeline was successful
We don't need to manage interrupts since the sleep call will alreade
throw on interrupt.
2024-12-01 18:27:22 +01:00
8f18158ad0 discord-ws: Add status code 1000 & 1001 to produce unresumable close event 2024-12-01 18:14:13 +01:00
16775d3fd4 discord-ws: Improve logging 2024-12-01 18:13:27 +01:00
02c979fe31 misc: Fix formatting
Using IntelliJ formatting.
2024-11-29 00:49:16 +01:00
f2e5b04c1c discord-ws: Fix resume if no resume URL is given
This can happen if something goes wrong befor auth.
For example with an init with a wrong payload leading to a
4002 error code from the gateway. In general before the ready event.
2024-11-28 20:13:57 +01:00
7fe9a82176 discord-ws: Fix sequence counting
Do not reset on events like heartbeat acks which have
seq 0/null.
2024-11-27 23:39:53 +01:00
db872beac5 discord-ws: Add logging 2024-11-27 23:36:47 +01:00
2ab3c5e01d build: Package as jlink image 2024-11-27 21:05:05 +01:00
e204a5069f bot: Start implementing message handling 2024-11-21 22:01:38 +01:00
590798c0c5 misc: Cleanup code
Deleded unused code, made vars final and private methods static.
2024-11-19 22:57:55 +01:00
16bcc6fdf3 misc: Make JUnit to a default dependency
Also removes the debug logback dependency from discord-ws since it
can now be tested with the bot package.
2024-11-15 21:04:11 +01:00
1a21d25861 discord-ws: Remove retry interface from constructor
The interface currently lies in a package which is not exported through
the module system and exporting the package is not a good solution.
2024-11-12 17:24:04 +01:00
1d56ce0511 discord-ws: Restructure for usage with java module system 2024-11-12 17:12:04 +01:00