killing the connection properly when the k flag is set