2d92e8a63f
- Implement retry logic for acquiring file lock with a maximum of 3 attempts. - Improve error handling for ENOENT errors by ensuring the directory exists before retrying. - Update context injection handler to delegate to SearchRoutes, reducing code duplication and preventing "headers already sent" errors. - Add checks for headersSent in error responses to avoid sending multiple responses. - Log warnings when the port does not free up after shutdown, and handle forced shutdown scenarios more gracefully.