If you block with a sword /dagger and swing while blocking, it will trigger your attack cooldown without dealing damage. Normally you can't hit while blocking, but the fact that it triggers the cooldown can prevent hits when you stop blocking.
While int he clip I do it on a pig, it does happen on players as well. The keystrokes mod is in the top lef to show I'm when I'm blocking/ hitting.