A method and arrangement for controlling milking by a milking machine includes a teat cup having a flexible teat receiving liner arranged inside a teat cup shell. During milking, a vacuum is applied to a lower part of the interior of the teat receiving liner to draw milk from a teat therein while the flexible teat receiving liner is periodically opened and collapsed by application of a pulsating massage vacuum between the flexible teat receiving liner and the teat cup shell. A pressure sensor repeatedly measures a vacuum level in an upper part of the interior of the teat receiving line, and depending on the repeatedly measured vacuum level, the periodic opening and collapsing of the flexible teat receiving liner is interrupted by keeping the flexible teat receiving liner collapsed for a specific period of time.