Mixed emotions

so I just kinda 'ended things' if you can call it that with someone I like who I was chatting to first on an app then on whatsapp. I kept feeling insecure because he never seemed interested so I kept my options open. Nevertheless I was honest and told him this which led to him saying that he didn't expect this of me and you don't do that when liking someone so he would go and start speaking to girls. After several back and forth I finally told him to call it a day and wished him luck for his finals coming up. He just replied 'alright thanks' no argument. Do you think I did the right thing? I kept getting stressed over how hot and cold our convos would be even though I like him quite a lot. I feel mixed about it, sad that we're not gonna be talking but also relief?