Blocking someone – an act of immaturity?

One day, a friend asked me whether I block anyone on social media. And my reply was yes. And he took this opportunity to shower his criticism on how I can do that and why was I not able to control my temper (Ironically, I was controlling while he was criticizing in a loud manner).
But when, he calmed down and was ready to listen to my side of the story, I told him this.