s2smanager: Make sure destroyed sessions have a sends2s method
authorKim Alvefur <zash@zash.se>
Wed, 13 May 2015 22:22:13 +0000 (00:22 +0200)
committerKim Alvefur <zash@zash.se>
Wed, 13 May 2015 22:22:13 +0000 (00:22 +0200)
core/s2smanager.lua

index 06d3f2c939d259358f9050fa86834fc67232bb24..fb5c4299db35aab7e99a00a915b941170ac99427 100644 (file)
@@ -64,6 +64,7 @@ function retire_session(session, reason)
 
        function session.send(data) log("debug", "Discarding data sent to resting session: %s", tostring(data)); end
        function session.data(data) log("debug", "Discarding data received from resting session: %s", tostring(data)); end
+       session.sends2s = session.send;
        return setmetatable(session, resting_session);
 end