python-samples
python-samples copied to clipboard
Connection request hangs without timing out
Expected Behavior
Connection request always succeeding or timing out
DEBUG __call__(117) Making request: POST https://oauth2.googleapis.com/token
DEBUG _new_conn(959) Starting new HTTPS connection (1): oauth2.googleapis.com:443
DEBUG _make_request(437) https://oauth2.googleapis.com:443 "POST /token HTTP/1.1" 200 None
Actual Behavior
Connection requests work fine for a while, then after a few hours a request freezes and the program hangs
DEBUG __call__(117) Making request: POST https://oauth2.googleapis.com/token
DEBUG _new_conn(959) Starting new HTTPS connection (1): oauth2.googleapis.com:443
--> Program hangs indefinitely
Steps to Reproduce the Problem
- quickstart.py
- Make a small change to schedule event requests :
def main():
while True:
events = getEvents()
#do stuff with events
time.sleep(600)
def getEvents():
#quickstart code pretty much as is
#instead of printing, it returns the events
Specifications
- python 3.5.3
- raspberry pi B2 with raspbian 9