Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Blocking inside GatewayBootsrap#withGateway throws IllegalStateException #915

Closed
Shadorc opened this issue May 1, 2021 · 0 comments
Closed
Labels
area/gateway Related to the gateway module: websocket, reconnections, payload handling bug A general bug
Milestone

Comments

@Shadorc
Copy link
Contributor

Shadorc commented May 1, 2021

This issue could be expected, I'm opening this for discussion as @quanticc suggested that this case should be handled (https://discord.com/channels/208023865127862272/278314058422157320/837808686125940748).

To Reproduce:

DiscordClient.create("")
    .gateway()
    .withGateway(gatewayDiscordClient -> {
        gatewayDiscordClient.getGuilds().collectList().block();
        return gatewayDiscordClient.onDisconnect();
    })
    .block();

Actual Behavior:
Exception in thread "main" java.lang.IllegalStateException: block()/blockFirst()/blockLast() are blocking, which is not supported in thread reactor-http-nio-2

Version: 3.1.6-SNAPSHOT and 3.2.0-SNAPSHOT

@quanticc quanticc added area/gateway Related to the gateway module: websocket, reconnections, payload handling bug A general bug labels May 1, 2021
@quanticc quanticc added this to the 3.1.6 milestone May 1, 2021
quanticc added a commit that referenced this issue May 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/gateway Related to the gateway module: websocket, reconnections, payload handling bug A general bug
Projects
None yet
Development

No branches or pull requests

2 participants