The Stream Management XEP defines how the maximum duration of a detached state is allowed to last. There are two variants to this: the client can request a custom value, and the server can tell what the actual duration is.
For now, Openfire should at least tell clients what the maximum allowed duration is.