Setting messageSendingQueueSupplier after construction results in messages not being sent
See original GitHub issueWhen setting the messageSendingQueueSupplier on a constructed client, messages that are not sent as immediate messages, won’t get sent at all. This includes, for example, join messages. I can reproduce this using something like this:
val builtClient = Client.builder().nick(twitchSettings.appUsername)
.server().host(TWITCH_SERVER).port(TWITCH_PORT).password(serverPassword).secure(true).then()
.build()
TwitchSupport.addSupport(builtClient, false)
and later:
@Handler
fun onConnected(connectedEvent: ClientConnectionEstablishedEvent) {
twitchSettings.initialChannels.map { asChannelName(it) }.forEach {
connectedEvent.client.addChannel(it)
}
}
CAP, PING, NICK etc. messages will get sent, but the JOIN messages, or other non-immediate messages, never.
I doubt this is limited to just twitch, but the built-in twitch support requires an already created client. If instead I apply the support manually, with the only difference being providing the queue supplier in the builder, the messages get sent.
I tried debugging the issue, but it seemed like the sending queue (where the joins were) was properly processing the items yet for some reason they never ended up being written to the channel. I might be reading it wrong though.
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (5 by maintainers)
Resolved in 5.0.1 which is released. I’ve learned a valuable lesson about testing before and after merging changes.
From my little testing this seems to fix it.