My Battle.net Disconnects

For a while now, randomly i am disconnected. At the same time my in-game chat never had pervious conversations. The message said i was disconnecting from battle net. LOL. What I discovered is by first opening the blizzard friends chat window and then the game maintains connection to me. My chat always has previous conversations and no more disconnects.