fix: update transport session when restoring session
This commit is contained in:
@@ -654,12 +654,16 @@ export class ServerPool {
|
|||||||
this.session = session;
|
this.session = session;
|
||||||
this.options.session = session;
|
this.options.session = session;
|
||||||
|
|
||||||
// Update session for all existing connections
|
// Update session for all existing connections and their transports
|
||||||
for (const conn of this.pool) {
|
for (const conn of this.pool) {
|
||||||
(conn as any).session = session;
|
if ((conn as any).transport) {
|
||||||
|
(conn as any).transport.session = session;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
for (const conn of this.used) {
|
for (const conn of this.used) {
|
||||||
(conn as any).session = session;
|
if ((conn as any).transport) {
|
||||||
|
(conn as any).transport.session = session;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user