wsid cannot be undefined
All checks were successful
Build / build (pull_request) Successful in 1m38s
All checks were successful
Build / build (pull_request) Successful in 1m38s
This commit is contained in:
parent
492a53093b
commit
64ebcad7fc
@ -43,7 +43,7 @@ export const stopWsServers = (promises: Promise<void>[]): void => {
|
||||
let lastWsid: number = 0;
|
||||
|
||||
interface IWsCustomData extends ws {
|
||||
id?: number;
|
||||
id: number;
|
||||
accountId?: string;
|
||||
}
|
||||
|
||||
@ -187,7 +187,7 @@ export const sendWsBroadcastEx = (data: IWsMsgToClient, accountId?: string, excl
|
||||
for (const client of wsServer.clients) {
|
||||
if (
|
||||
(!accountId || (client as IWsCustomData).accountId == accountId) &&
|
||||
(!excludeWsid || (client as IWsCustomData).id != excludeWsid)
|
||||
(client as IWsCustomData).id != excludeWsid
|
||||
) {
|
||||
client.send(msg);
|
||||
}
|
||||
@ -197,7 +197,7 @@ export const sendWsBroadcastEx = (data: IWsMsgToClient, accountId?: string, excl
|
||||
for (const client of wssServer.clients) {
|
||||
if (
|
||||
(!accountId || (client as IWsCustomData).accountId == accountId) &&
|
||||
(!excludeWsid || (client as IWsCustomData).id != excludeWsid)
|
||||
(client as IWsCustomData).id != excludeWsid
|
||||
) {
|
||||
client.send(msg);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user