Skip to content

Commit cf717f1

Browse files
committed
refactor: remove health check
1 parent 9ba5a2c commit cf717f1

1 file changed

Lines changed: 2 additions & 19 deletions

File tree

frontend/src/utils/sfu-client.js

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,6 @@ class SFUClient {
4040
this.connectionDetails = connectionDetails;
4141
this.scheduleTokenRefresh();
4242

43-
await this.validateSFUHealth();
44-
4543
await this.establishSocketConnection();
4644

4745
return true;
@@ -122,7 +120,7 @@ class SFUClient {
122120
};
123121
}
124122

125-
async validateSFUHealth() {
123+
async getSFUEndpoint() {
126124
const { sfuUrl, sfuPort } = this.connectionDetails;
127125

128126
let sfuEndpoint;
@@ -135,26 +133,11 @@ class SFUClient {
135133
sfuEndpoint = `${urlObj.protocol}//${urlObj.hostname}:${sfuPort}`;
136134
}
137135

138-
try {
139-
const healthResponse = await fetch(`${sfuEndpoint}/health`);
140-
if (!healthResponse.ok) {
141-
console.warn(
142-
"SFU health check failed, but attempting connection anyway",
143-
);
144-
}
145-
} catch (fetchError) {
146-
console.warn(
147-
"SFU health check failed:",
148-
fetchError.message,
149-
"- attempting socket connection anyway",
150-
);
151-
}
152-
153136
return sfuEndpoint;
154137
}
155138

156139
async establishSocketConnection() {
157-
const sfuEndpoint = await this.validateSFUHealth();
140+
const sfuEndpoint = await this.getSFUEndpoint();
158141
const { authToken } = this.connectionDetails;
159142

160143
this.socket = io(sfuEndpoint, {

0 commit comments

Comments
 (0)