Commit graph

9 commits

Author SHA1 Message Date
Kim Alvefur
7badf61246 mod_admin_socket: Comment on LuaSocket UNIX compat code
Ref #1717
2022-03-16 19:32:17 +01:00
Kim Alvefur
8e5fec3220 mod_admin_socket: Compat for luasocket prior to unix datagram support
The "socket.unix" module exported only a function before
aa1b8cc9bc
when datagram support was added.

Fixes #1717

Thanks rsc and lucas for reporting and testing
2022-03-15 10:48:46 +01:00
Jonas Schäfer
6671cc037e adminstream: fire disconnected event on lower layer disconnect
This may in theory cause multiple disconnect events for the
adminstream client, if the only code using that wasn't calling
os.exit right away.

Hence, this should be a good enough partial fix for #1671. It is
not a full fix, because the shell will only notice the disconnect
after one has hit enter in the input; until then, it is stuck in
a read() call to stdin and completely oblivious to the disconnect.
2021-12-21 21:23:01 +01:00
Kim Alvefur
15227ecbc6 util.adminstream: Prevent closure on read timeout 2020-06-18 17:54:28 +02:00
Kim Alvefur
a6c4ce73ef util.adminstream: Set a read timeout handler
So that net.server doesn't close the connection on inactivity.
2020-06-04 16:17:14 +02:00
Matthew Wild
56c159d7c9 util.adminstream: Fire event based on stanza name too for convenience 2020-06-03 22:26:48 +01:00
Matthew Wild
9aebf2d7db util.adminstream: Import net.server [luacheck] 2020-06-02 08:41:05 +01:00
Matthew Wild
78a8bfc31d util.prosodyctl.shell, util.adminstream: Move connection logic into adminstream for easier reuse 2020-06-02 08:28:39 +01:00
Matthew Wild
4c6992a00e mod_admin_socket, util.adminstream: New module to manage a local unix domain socket for admin functionality 2020-06-01 15:42:19 +01:00