Fix the bug of disconnection with db server