fix the connection close bug in accAPI