This is an example of FEEDBACK MECHANISM.
Feedback mechanism is used by the body to control what is happening in the body. There are two types of feedback mechanism, negative and positive feedback mechanisms. The example cited in this question is a negative feed back mechanism.