Clears state on connection close