Why would a male co worker stop talking to me after finding out I am not single?

We were really friendly until he found out (from another coworker) that I have a boyfriend.
Why would be suddenly he ignoring me now? Is that with giving up a friendship?
do I need to tell other guys im taken? Haha
Why would a male co worker stop talking to me after finding out I am not single?
Post Opinion