A witness shall not be liable to be sued, in a county in which he does not reside, by being served with a summons in such county while going, returning or attending in obedience to a subpoena.