On Sat, Oct 4, 2008 at 8:48 PM, Jonathan Schleifer
<[EMAIL PROTECTED]> wrote:
> Which is IMO a painfully bad idea for users with instable connections.
> They will have thousands of resources online after a short while and
> you don't know which to msg. Very, very bad idea, IMO. Makes it totally
> unusable with an unstable conenction. You *WANT* a static resource
> then, so you can replace the old, dead connection.
Why? Do no servers do ping timeouts or something? Thousands of
resources, seriously?
How does replacing the resource work? I thought <conflict/> was issued
if the resource was in use.
I've changed my code to accept a client-generated resource as-is.
+++ xmpp/client_iq.rb (working copy)
@@ -122,12 +122,14 @@
#
# If it's empty they want us to generate one for them, if not
# they've supplied a string to use. The new draft RFC says we should
- # add random text onto that anyhow, so we do.
+ # add random text onto that anyhow, but apparently no one likes
+ # that. We'll go ahead and accept theirs if they supply it,
+ # which they shouldn't.
#
unless elem.has_elements?
- resource = @jid.split('@')[0] + rand(rand(100000)).to_s
+ resource = @jid.split('@')[0]
else
- resource = elem.elements['resource'].text + rand(rand(10000)).to_s
+ resource = elem.elements['resource'].text + Stream.gen_id
> --
> Jonathan
>
-- Eric Will