Skip to content

Commit

Permalink
fix: avoid sending unused data
Browse files Browse the repository at this point in the history
  • Loading branch information
rejetto committed Nov 5, 2023
1 parent 6664ce7 commit e746d9c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/adminApis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ export const adminApis: ApiHandlers = {
version: VERSION,
apiVersion: API_VERSION,
compatibleApiVersion: COMPATIBLE_API_VERSION,
...await getServerStatus(),
...await getServerStatus(false),
platform: process.platform,
urls: await getUrls(),
ips: await getIps(false),
Expand Down
4 changes: 2 additions & 2 deletions src/listen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ function getCurrentPort(srv: typeof httpSrv) {
return (srv?.address() as any)?.port as number | undefined
}

export async function getServerStatus() {
export async function getServerStatus(includeSrv=true) {
return {
http: await serverStatus(httpSrv, portCfg.get()),
https: await serverStatus(httpsSrv, httpsPortCfg.get()),
Expand All @@ -246,7 +246,7 @@ export async function getServerStatus() {
busy,
port: getCurrentPort(srv) || configuredPort,
configuredPort,
srv,
srv: includeSrv ? srv : undefined,
}
}}

Expand Down

0 comments on commit e746d9c

Please sign in to comment.