connection代码调整