mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-09-22 06:00:56 +02:00
🔐 fix: Remove OAuth handler cleanup at Connection Change (#9589)
This commit is contained in:
parent
b62ffb533c
commit
133312fb40
1 changed files with 0 additions and 10 deletions
|
@ -220,18 +220,8 @@ export class MCPConnectionFactory {
|
|||
|
||||
connection.on('oauthRequired', oauthHandler);
|
||||
|
||||
/** Handler reference for cleanup when connection state changes to disconnected */
|
||||
const cleanupHandler = (state: string) => {
|
||||
if (state === 'disconnected') {
|
||||
connection.removeListener('oauthRequired', oauthHandler);
|
||||
connection.removeListener('connectionChange', cleanupHandler);
|
||||
}
|
||||
};
|
||||
connection.on('connectionChange', cleanupHandler);
|
||||
|
||||
return () => {
|
||||
connection.removeListener('oauthRequired', oauthHandler);
|
||||
connection.removeListener('connectionChange', cleanupHandler);
|
||||
};
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue