LLM-Driven Extraction of Unstructured Data — Built for API Deployments & ETL Pipeline Workflows
Python ai-agentsdata-engineeringdocument-aigenerative-aiidpjson-extractionllmmcp-serverocrpdf-extractionprompt-engineeringstructured-output
Socket cleanup on unload (#317)
Deepak K49df1a2e341c
diff --git a/frontend/src/helpers/SocketContext.js b/frontend/src/helpers/SocketContext.jsindex 9dcf78bef..fa8d32e17 100644--- a/frontend/src/helpers/SocketContext.js+++ b/frontend/src/helpers/SocketContext.js@@ -22,7 +22,10 @@ const SocketProvider = ({ children }) => {}const newSocket = io(baseUrl, body);setSocket(newSocket);-+ // Clean up the socket connection on browser unload+ window.onbeforeunload = () => {+ newSocket.disconnect();+ };// Clean up the socket connection on component unmountreturn () => {newSocket.disconnect();