Update main.py

Test with long time connection
Merge pull request #1 from Chipsterjulien/patch-1

Update main.py