no message

This commit is contained in:
kuaifan 2024-12-12 12:54:50 +08:00
parent 69ec4966d5
commit a032c6114f
4 changed files with 18 additions and 5 deletions

View File

@ -103,6 +103,10 @@ class WebSocketService implements WebSocketHandlerInterface
case 'receipt':
return;
// 握手信息
case 'handshake':
break;
// 访问状态
case 'path':
$row = WebSocket::whereFd($frame->fd)->first();

View File

@ -167,7 +167,7 @@ services:
ai:
container_name: "dootask-ai-${APP_ID}"
image: "kuaifan/dootask-ai:0.2.0"
image: "kuaifan/dootask-ai:0.2.2"
environment:
REDIS_HOST: "${REDIS_HOST}"
REDIS_PORT: "${REDIS_PORT}"

View File

@ -179,10 +179,19 @@ export default {
$A.updateTimezone()
this.__windowTimer && clearTimeout(this.__windowTimer)
this.__timeoutTimer && clearTimeout(this.__timeoutTimer)
this.__windowTimer = setTimeout(async () => {
try {
await this.$store.dispatch("call", {url: "users/socket/status"})
await this.$store.dispatch("websocketSend", {type: 'handshake'})
await new Promise((resolve, reject) => {
this.$store.dispatch("websocketSend", {
type: 'handshake',
callback: (_, ok) => {
ok ? resolve() : reject(new Error('Handshake failed'));
}
});
this.__timeoutTimer = setTimeout(() => reject(new Error('Handshake timeout')), 6000);
});
} catch {
await this.$store.dispatch("websocketConnection")
}
@ -351,7 +360,7 @@ export default {
'meetings.vonage.com', // Vonage Video
'voovmeeting.com', //
'skype.com', // Skype
// API
'maps.google.com', // Google
'maps.apple.com', //
@ -437,7 +446,7 @@ export default {
'twitter://', // Twitter
'instagram://', // Instagram
'linkedin://' // LinkedIn
];
];
const lowerUrl = `${url}`.toLowerCase()
return meetingDomains.some(domain => lowerUrl.indexOf(domain) !== -1);
},

View File

@ -4030,7 +4030,7 @@ export default {
return
}
if (typeof callback === "function") {
msgId = $A.randomString(16)
msgId = type + '_' + $A.randomString(3)
state.wsCall[msgId] = callback
}
try {