Software /
code /
verse
Diff
plugins/smacks.lua @ 200:4166213cc9bd
plugins.smacks: Add 1s delay between reconnect attempts
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Fri, 18 Mar 2011 21:42:00 +0000 |
parent | 197:7e98cf2c1d8d |
child | 201:1fce24cb2c41 |
line wrap: on
line diff
--- a/plugins/smacks.lua Fri Mar 18 21:39:57 2011 +0000 +++ b/plugins/smacks.lua Fri Mar 18 21:42:00 2011 +0000 @@ -20,8 +20,9 @@ stream.stream_management_supported = nil; if stream.resumption_token then stream.authenticated = nil; - stream:connect(stream.connect_host or stream.host, stream.connect_port or 5222); - stream:reopen(); + verse.add_task(1, function () + stream:connect(stream.connect_host or stream.host, stream.connect_port or 5222); + end); return true; end end