改善Connection处理.

Signed-off-by: Jack <jack.wgm@gmail.com>