Software /
code /
prosody
Comparison
net/connect.lua @ 9386:0f395d82b4ea
net.connect: Remove manual onattach callback invocation
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Wed, 26 Sep 2018 15:07:25 +0200 |
parent | 8550:f841d359da65 |
child | 9387:33e52f727f0f |
comparison
equal
deleted
inserted
replaced
9385:58fe099043ed | 9386:0f395d82b4ea |
---|---|
54 conn:close(); | 54 conn:close(); |
55 return; | 55 return; |
56 end | 56 end |
57 pending_connections_map[conn] = nil; | 57 pending_connections_map[conn] = nil; |
58 p:log("debug", "Successfully connected"); | 58 p:log("debug", "Successfully connected"); |
59 if p.listeners.onattach then | |
60 p.listeners.onattach(conn, p.data); | |
61 end | |
62 conn:setlistener(p.listeners); | 59 conn:setlistener(p.listeners); |
63 return p.listeners.onconnect(conn); | 60 return p.listeners.onconnect(conn); |
64 end | 61 end |
65 | 62 |
66 function pending_connection_listeners.ondisconnect(conn, reason) | 63 function pending_connection_listeners.ondisconnect(conn, reason) |