Software /
code /
prosody
Comparison
net/server_epoll.lua @ 9387:33e52f727f0f
net.connect: Fix passing request table to new listener
This could be a return value from ondetach
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Wed, 26 Sep 2018 17:36:53 +0200 |
parent | 9385:58fe099043ed |
child | 9430:412ff404bf58 |
comparison
equal
deleted
inserted
replaced
9386:0f395d82b4ea | 9387:33e52f727f0f |
---|---|
134 end | 134 end |
135 return ("FD %d"):format(self:getfd()); | 135 return ("FD %d"):format(self:getfd()); |
136 end | 136 end |
137 | 137 |
138 -- Replace the listener and tell the old one | 138 -- Replace the listener and tell the old one |
139 function interface:setlistener(listeners) | 139 function interface:setlistener(listeners, data) |
140 self:on("detach"); | 140 self:on("detach"); |
141 self.listeners = listeners; | 141 self.listeners = listeners; |
142 self:on("attach"); | 142 self:on("attach", data); |
143 end | 143 end |
144 | 144 |
145 -- Call a listener callback | 145 -- Call a listener callback |
146 function interface:on(what, ...) | 146 function interface:on(what, ...) |
147 if not self.listeners then | 147 if not self.listeners then |