Skip to content

Commit

Permalink
Merged PR 4979: Fix unix socket connection
Browse files Browse the repository at this point in the history
  • Loading branch information
peuter committed Jan 30, 2024
2 parents e23833e + ecfa8e8 commit 7731e41
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@busch-jaeger/free-at-home",
"version": "0.34.2",
"version": "0.34.3",
"description": "Library for free@home local device api",
"repository": {
"type": "git",
Expand Down
4 changes: 2 additions & 2 deletions src/addon/core/request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -230,8 +230,8 @@ function getAgent(url: string, basePath: string) {
const apiPath = parsedUrl.pathname;
if (!socketAgents.has(apiPath)) {
console.log('creating unix socket agent for', apiPath);
const unixSocketAgent = new http.Agent(<object>{
socketPath: "/run" + apiPath,
const unixSocketAgent = new http.Agent({
host: "ws+unix:///run" + apiPath + ":" + apiPath
});
socketAgents.set(apiPath, unixSocketAgent);
return unixSocketAgent;
Expand Down
4 changes: 2 additions & 2 deletions src/core/request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -230,8 +230,8 @@ function getAgent(url: string, basePath: string) {
const apiPath = parsedUrl.pathname;
if (!socketAgents.has(apiPath)) {
console.log('creating unix socket agent for', apiPath);
const unixSocketAgent = new http.Agent(<object>{
socketPath: "/run" + apiPath,
const unixSocketAgent = new http.Agent({
host: "ws+unix:///run" + apiPath + ":" + apiPath
});
socketAgents.set(apiPath, unixSocketAgent);
return unixSocketAgent;
Expand Down
4 changes: 2 additions & 2 deletions src/fhapi/core/request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -230,8 +230,8 @@ function getAgent(url: string, basePath: string) {
const apiPath = parsedUrl.pathname;
if (!socketAgents.has(apiPath)) {
console.log('creating unix socket agent for', apiPath);
const unixSocketAgent = new http.Agent(<object>{
socketPath: "/run" + apiPath,
const unixSocketAgent = new http.Agent({
host: "ws+unix:///run" + apiPath + ":" + apiPath
});
socketAgents.set(apiPath, unixSocketAgent);
return unixSocketAgent;
Expand Down
4 changes: 2 additions & 2 deletions src/rpc/core/request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -230,8 +230,8 @@ function getAgent(url: string, basePath: string) {
const apiPath = parsedUrl.pathname;
if (!socketAgents.has(apiPath)) {
console.log('creating unix socket agent for', apiPath);
const unixSocketAgent = new http.Agent(<object>{
socketPath: "/run" + apiPath,
const unixSocketAgent = new http.Agent({
host: "ws+unix:///run" + apiPath + ":" + apiPath
});
socketAgents.set(apiPath, unixSocketAgent);
return unixSocketAgent;
Expand Down
4 changes: 2 additions & 2 deletions src/serial/core/request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -230,8 +230,8 @@ function getAgent(url: string, basePath: string) {
const apiPath = parsedUrl.pathname;
if (!socketAgents.has(apiPath)) {
console.log('creating unix socket agent for', apiPath);
const unixSocketAgent = new http.Agent(<object>{
socketPath: "/run" + apiPath,
const unixSocketAgent = new http.Agent({
host: "ws+unix:///run" + apiPath + ":" + apiPath
});
socketAgents.set(apiPath, unixSocketAgent);
return unixSocketAgent;
Expand Down

0 comments on commit 7731e41

Please sign in to comment.