pattern when get keep alive and connect or disconnect a single client