SIGN IN SIGN UP
ChatGPTNextWeb / NextChat UNCLAIMED

✨ Light and Fast AI Assistant. Support: Web | iOS | MacOS | Android | Linux | Windows

0 0 36 TypeScript

Fix memory leak issue by adding fetch request timeout

This commit resolves a memory leak issue that was occurring due to fetch requests hanging indefinitely. A timeout has been introduced to the `requestOpenai` function which ensures that these requests are aborted after a set period of time (currently 10 minutes). Additionally, error handling has been added to catch and log `AbortError` when a fetch request is aborted. This fix significantly improves the stability and reliability of the application by preventing memory leaks related to unresolved fetch requests.
C
Clarence Dan committed
ac79d810d03d589800d0d035413f61fb3ef4c4c3
Parent: 2b912c6
Committed by GitHub <noreply@github.com> on 5/18/2023, 8:55:51 AM