Had a bad network experience for a few days. My network was slow on the machine and was i was losing the connection a no of times in a day.
Luckily if found a quick fix for the problem. Start the cmd command on an elevated command prompt and enter the following command
C:\>netsh winsock reset
After this command restart your computer and hopefully the problem would be resolved.