fixed single connection check

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

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