Added resubscribe code

Runs every 4 minutes to keep control of the sockets