fix(typedserver): Update WebSocket peer tag and add error handling for pushTime
This commit is contained in:
@@ -258,7 +258,7 @@ export class TypedServer {
|
||||
websocket: {
|
||||
typedRouter: this.typedrouter,
|
||||
onConnectionOpen: (peer) => {
|
||||
peer.tags.add('typedserver_frontend');
|
||||
peer.tags.add('allClients');
|
||||
console.log(`WebSocket connected: ${peer.id}`);
|
||||
},
|
||||
onConnectionClose: (peer) => {
|
||||
@@ -644,6 +644,8 @@ export class TypedServer {
|
||||
);
|
||||
pushTime.fire({
|
||||
time: this.lastReload,
|
||||
}).catch(err => {
|
||||
console.warn('Failed to push latest server change time to client:', err);
|
||||
});
|
||||
}
|
||||
} catch (error) {
|
||||
|
||||
Reference in New Issue
Block a user