diff options
author | Kim Alvefur <zash@zash.se> | 2020-06-01 17:27:50 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2020-06-01 17:27:50 +0200 |
commit | 5cdbe0edde662c434cb5c4df8c5153a1b324a4b0 (patch) | |
tree | 46075778fb2984a6717f716e42613b98772703db /plugins | |
parent | 9708aab9b3b62c87e038f8d33cf64c8d11d53d32 (diff) | |
download | prosody-5cdbe0edde662c434cb5c4df8c5153a1b324a4b0.tar.gz prosody-5cdbe0edde662c434cb5c4df8c5153a1b324a4b0.zip |
mod_admin_socket: Use wrapserver if available
Why have a custom accept function when this is net.server's entire
thing?
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/mod_admin_socket.lua | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/plugins/mod_admin_socket.lua b/plugins/mod_admin_socket.lua index c094aad2..2085c5b0 100644 --- a/plugins/mod_admin_socket.lua +++ b/plugins/mod_admin_socket.lua @@ -55,7 +55,11 @@ function module.load() os.remove(socket_path); assert(sock:bind(socket_path)); assert(sock:listen()); - conn = server.watchfd(sock:getfd(), accept_connection); + if server.wrapserver then + conn = server.wrapserver(sock, socket_path, 0, listeners); + else + conn = server.watchfd(sock:getfd(), accept_connection); + end end function module.unload() |