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

ScheduledExecutorService may not be shutdown in ChannelFactory #619

Closed
Daemonxiao opened this issue Jun 20, 2022 · 0 comments · Fixed by #618
Closed

ScheduledExecutorService may not be shutdown in ChannelFactory #619

Daemonxiao opened this issue Jun 20, 2022 · 0 comments · Fixed by #618
Labels
type/bug Something isn't working

Comments

@Daemonxiao
Copy link
Contributor

Daemonxiao commented Jun 20, 2022

Bug Report

1. Describe the bug

public class ChannelFactory implements AutoCloseable {
    private final ScheduledExecutorService recycler = Executors.newSingleThreadScheduledExecutor();
     ....
     public void close() {
     ....
      if (certContext != null) {
        recycler.shutdown();                                      // recycler would not shutdown when TLS is disable
        if (certWatcher != null) {
          certWatcher.close();
        }
      }
    }
}
@Daemonxiao Daemonxiao added the type/bug Something isn't working label Jun 20, 2022
@Daemonxiao Daemonxiao changed the title Hanging when exit in TiSpark Hanging when exiting in TiSpark Jun 20, 2022
@Daemonxiao Daemonxiao changed the title Hanging when exiting in TiSpark ScheduledExecutorService didn't shutdown in ChannelFactory Jun 21, 2022
@Daemonxiao Daemonxiao changed the title ScheduledExecutorService didn't shutdown in ChannelFactory ScheduledExecutorService clould not be shutdown in ChannelFactory Jun 21, 2022
@Daemonxiao Daemonxiao changed the title ScheduledExecutorService clould not be shutdown in ChannelFactory ScheduledExecutorService may not be shutdown in ChannelFactory Jun 21, 2022
iosmanthus added a commit that referenced this issue Jun 22, 2022
…esource leak (#618)

Co-authored-by: iosmanthus <dengliming@pingcap.com>
iosmanthus pushed a commit that referenced this issue Jun 22, 2022
…esource leak (#618) (#621)

Co-authored-by: Daemonxiao <35677990+Daemonxiao@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Something isn't working
Projects
None yet
1 participant