If you have a desktop or laptop, make sure to disable the sleep mode. It is the primary reason why a PC keeps losing the internet connection. In the case of the laptop, you can disable the sleep action on the lid closed.