Adding socket.sleep to main loop

Preventing unchecked CPU usage.