mirror of
https://github.com/NanmiCoder/cc-haha
synced 2026-07-27 15:13:37 +08:00
迁移代码打包
迁移代码打包
This commit is contained in:
parent
db1ebabe40
commit
857c931911
@ -694,11 +694,21 @@ export class ConversationService {
|
||||
return true
|
||||
}
|
||||
|
||||
detachSdkConnection(sessionId: string): void {
|
||||
detachSdkConnection(
|
||||
sessionId: string,
|
||||
socket?: { send(data: string): void },
|
||||
): void {
|
||||
const session = this.sessions.get(sessionId)
|
||||
if (session) {
|
||||
session.sdkSocket = null
|
||||
if (!session) return
|
||||
// Only clear sdkSocket when the closing socket is the one currently
|
||||
// attached. During a restart transition the old CLI's WS close event
|
||||
// can arrive AFTER the new CLI has already connected its own SDK WS —
|
||||
// blindly nulling here would clobber the fresh connection and leave
|
||||
// outbound messages stranded in pendingOutbound forever.
|
||||
if (socket && session.sdkSocket && session.sdkSocket !== socket) {
|
||||
return
|
||||
}
|
||||
session.sdkSocket = null
|
||||
}
|
||||
|
||||
handleSdkPayload(sessionId: string, rawPayload: string): void {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user