Cannot connect to VAC

When I join server, I can play for a bit but after like a minute or two I get an error that says " A connection to VAC could no be established" ect… Anyone know how to fix this?

Restart Steam, fixed it for me.