As Collective asked, what is the error message you receive when you disconnect? It should appear in your Status window.
If it's 'Software caused connection abort' as I suspect it is, you're best off sifting through this sticky thread
as there are many many solutions contained within. The most common solutions are in ParaBrat's first post, but some users have posted alternatives in the posts after that.
This is not a bug and so I have moved the thread to the Connection Issues board.