My app runs in daemon mode in the background collecting data every day. (This historical data is later used for other purpose). I can log in the app to my zerodha account and it collects data for that market day perfectly. However around midnight the connection/session goes invalid. Thus I have to manually log in the morning every day for the app else that day's data would be skipped. Is there any way to create a long lived connection that would either not be invalidated at midnight or can be revalidated automatically without human intervention?