Add `closing` boolean to avoid emitting multiple go away frames