Skip to content

ServerWatchStream can't be closed when client closed watcher #1510

@chaofengliu-okg

Description

@chaofengliu-okg

Versions

  • etcd: 3.5.17
  • jetcd: 0.8.3
  • java: JDK21

Describe the bug
After multiple calls to add watcher and close watcher, the watcher streams inside etcd continue to increase without being released, resulting in a leak.

To Reproduce
while(1) {
Watch.Watcher watcher = etcdClient.getWatchClient().watch(....);
TimeUnit.SECONDS.sleep(5);
watcher.close();
}

Expected behavior
watcher.close() will close the watcher stream and watcher routine

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions