Skip to content

Commit 355349d

Browse files
committed
refactor: streamline request processing logic in XrayService
1 parent 2db7c5a commit 355349d

1 file changed

Lines changed: 17 additions & 17 deletions

File tree

src/modules/xray-core/xray.service.ts

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -97,25 +97,25 @@ export class XrayService implements OnApplicationBootstrap {
9797
interface: interfaceStats,
9898
};
9999

100-
try {
101-
if (this.isXrayStartedProccesing) {
102-
this.logger.warn('Request already in progress');
103-
return {
104-
isOk: true,
105-
response: new StartXrayResponseModel(
106-
false,
107-
this.xrayVersion,
108-
'Request already in progress',
109-
{
110-
version: this.nodeVersion,
111-
},
112-
system,
113-
),
114-
};
115-
}
100+
if (this.isXrayStartedProccesing) {
101+
this.logger.warn('Request already in progress');
102+
return {
103+
isOk: true,
104+
response: new StartXrayResponseModel(
105+
false,
106+
this.xrayVersion,
107+
'Request already in progress',
108+
{
109+
version: this.nodeVersion,
110+
},
111+
system,
112+
),
113+
};
114+
}
116115

117-
this.isXrayStartedProccesing = true;
116+
this.isXrayStartedProccesing = true;
118117

118+
try {
119119
if (this.isXrayOnline && !this.disableHashedSetCheck && !body.internals.forceRestart) {
120120
const { isOk } = await this.xtlsSdk.stats.getSysStats();
121121

0 commit comments

Comments
 (0)