DSA is an algorithm used to generate a digital signature, which consists of a pair of values $(r,s)$. The algorithm computes $r$ first and then $s$. However, if we calculate $s=0$, it says to restart the algorithm choosing a different pseudorandom integer $k$ as our starting point.
What is the purpose of this? Is a digital signature $(r,s)$ invalid if $s=0$? If so, why?