You can check to make sure your power management settings are not negatively impacting your WiFi adapter’s performance. To prevent undesired closing of the connection when your laptop goes into sleep mode, do the following.
Right-click on the start button for power management. You will see a screen similar to the one shown below.
Click “Change plan settings” for the power plan you are on. The name of the power plan may be different than the one on your computer. In the next screen, select the option “Advanced power settings”.
You now see the screen where you can adjust the advanced power settings. Find the settings for the wireless network adapter, and make sure that it is set to maximum performance for both when using AC power and on battery.
Confirm the changes you have made by clicking OK.