Software /
code /
prosody
Diff
core/sessionmanager.lua @ 565:3a49d85cafbc
Backed out changeset 099d8a102deb (committed too much)
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Fri, 05 Dec 2008 19:49:16 +0000 |
parent | 563:099d8a102deb |
child | 569:5216efe6088b |
line wrap: on
line diff
--- a/core/sessionmanager.lua Fri Dec 05 19:24:01 2008 +0000 +++ b/core/sessionmanager.lua Fri Dec 05 19:49:16 2008 +0000 @@ -35,8 +35,6 @@ local rm_load_roster = require "core.rostermanager".load_roster; local config_get = require "core.configmanager".get; -local gettime = require "socket".gettime; - local st = require "util.stanza"; local newproxy = newproxy; @@ -47,7 +45,7 @@ local open_sessions = 0; function new_session(conn) - local session = { conn = conn, priority = 0, type = "c2s_unauthed", conntime = gettime() }; + local session = { conn = conn, priority = 0, type = "c2s_unauthed" }; if true then session.trace = newproxy(true); getmetatable(session.trace).__gc = function () open_sessions = open_sessions - 1; print("Session got collected, now "..open_sessions.." sessions are allocated") end; @@ -111,8 +109,6 @@ if session.resource then return nil, "cancel", "already-bound", "Cannot bind multiple resources on a single connection"; end -- We don't support binding multiple resources - session.conntimetotal = gettime()-session.conntime; - resource = resource or uuid_generate(); --FIXME: Randomly-generated resources must be unique per-user, and never conflict with existing