Assign connection to correct clientGraphite variable in the right scope