Diff

core/sessionmanager.lua @ 8185:e89320b8a789

Merge 0.10 -> trunk
author Matthew Wild <mwild1@gmail.com>
date Fri, 28 Jul 2017 23:47:38 +0100
parent 7950:f91e7ec9654e
parent 8184:dbcae15b4282
child 8555:4f0f5b49bb03
line wrap: on
line diff
--- a/core/sessionmanager.lua	Thu Jul 06 11:24:36 2017 +0200
+++ b/core/sessionmanager.lua	Fri Jul 28 23:47:38 2017 +0100
@@ -188,10 +188,14 @@
 	local err;
 	session.roster, err = rm_load_roster(session.username, session.host);
 	if err then
+		-- FIXME: Why is all this rollback down here, instead of just doing the roster test up above?
 		full_sessions[session.full_jid] = nil;
 		hosts[session.host].sessions[session.username].sessions[resource] = nil;
 		session.full_jid = nil;
 		session.resource = nil;
+		if session.type == "c2s" then
+			session.type = "c2s_unbound";
+		end
 		if next(bare_sessions[session.username..'@'..session.host].sessions) == nil then
 			bare_sessions[session.username..'@'..session.host] = nil;
 			hosts[session.host].sessions[session.username] = nil;