fix when all connection is close,then close session