饒夢楠
饒夢楠

Reputation: 41

Why can't I shutdown the Netty Server or Netty Client ?

Expected behavior

I have launched a netty server and establish a connection with it via netty client. The client sends a message to the server, while the server will feedback and close context (Channel), when the client got a message from the server, it will close channel and shutdown EventLoopGroup, and then exit the program.

Actual behavior

However, all the channel was closed, but the EventLoopGroup unable to shutdown (isShutdown always false), no matter client or server, the main thread blocked.

Steps to reproduce

The code as follow.

Minimal yet complete reproducer code (or URL to code)

The code in this issue

Netty version

    <dependency>
        <groupId>io.netty</groupId>
        <artifactId>netty-all</artifactId>
        <version>4.1.20.Final</version>
    </dependency>

JVM version (e.g. java -version)

java version "1.8.0_131"

OS version (e.g. uname -a)

Upvotes: 0

Views: 631

Answers (1)

饒夢楠
饒夢楠

Reputation: 41

It's the bug of the 4.1.20,just update to 4.1.21 My issue

The clearThread is not deamon thread

enter image description here

Upvotes: 2

Related Questions