eclipse-thingweb / eclipse-thingweb/node-wot

`servient.shutdown` does not close open http connections

Open
#1,506 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
192
Forks
100
Avg merge
3d 2h
Merged PRs (30d)
6

Description

As stated in https://github.com/eclipse-thingweb/node-wot/issues/1503#issuecomment-4091231642:
> The hard thing is that await servient.shutdown(); should also work (instead of using the subscription object and stopping it). However, it does not close the subscription as it only calls HTTPFactory destroy -> which does nothing. Probably this is a separate issue, and this one can be closed once the example is updated as above.

A trivial solution could be to keep a reference to the HTTP client created in the HTTPFactory and close it when it is destroyed. But I noticed that we are currently caching clients also at the `ConsumeThing` level, which is a little bit counterintuitive as it should be the binding to decide what and when to cache. Probably a proper review of the current core -> protocol bindings interaction pattern is needed before closing this issue.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.