[connectionagent] dont disconnect if online. fixes JB#6946

add test