Gay Episcopal Bishop Gene Robinson was once married and had children. His case was not unique by any means. Former conservative Republican Congressman Robert Bauman was married with kids before being caught in a gay bar.
Marriage is not a guarantee of non-homosexuality (attraction to women can be faked) ... but it is a better safeguard than is celibacy (wherein attraction to women need not even be faked).
SnakeDoc