If the client has sprint bound to a key, they will not stop sprinting when the server tells them to. Double tapping forward to sprint does not produce this behavior.
When a player goes to attack an entity, if they are sprinting, the server tells them not to sprint. The client receives this metadata, but ignores it without even sending an entity action to tell the server that it's still sprinting (when holding a sprint key). Thus you end up in a state where the client is sprinting but the server doesn't think so.
Is this still an issue in the most recent versions (i.e. 1.10.2, or 16w42a) of Minecraft?