I am trying to make a long-running Python script that periodically queries Reddit for new submissions/comments using PRAW 4.4.0 and at first I initialize the object like this:
redditClient = praw.Reddit(
client_id=constants.REDDIT_CLIENT_ID,
client_secret=constants.REDDIT_CLIENT_SECRET,
user_agent=constants.REDDIT_USER_AGENT
)
After a period of time I am receiving the following error:
error with request ('Connection aborted.', error(104, 'Connection reset by peer'))
My guess is that this happens because I am keeping the connection open, but I didn't find a way how to close it. Can you help me figure out how to resolve this issue?