svc: Move connection limit checking to its own function