s2smanager: Remove srv_hosts from session when connected, this fixes attempting to...
[prosody.git] / core / s2smanager.lua
index 386e0794e360562dfa3bf3a753d5a76f4597d633..879084d86554db54dd19c5dbcac55ff1d59cab83 100644 (file)
@@ -35,7 +35,7 @@ local log = logger_init("s2smanager");
 
 local sha256_hash = require "util.hashes".sha256;
 
-local dialback_secret = sha256_hash(tostring{} .. math.random() .. socket.gettime(), true);
+local dialback_secret = uuid_gen();
 
 local adns = require "net.adns";
 
@@ -379,6 +379,8 @@ function mark_connected(session)
                        end
                        session.sendq = nil;
                end
+               
+               session.srv_hosts = nil;
        end
 end