What steps will reproduce the problem?
1. Open the shell
2. Restart the server
3. Do something in the shell
What is the expected output?
Shell should have noticed the shutdown and disconnected
What do you see instead?
prosody> foo:bar()
adminstream info Admin client disconnected: closed
Note: Shell doesn't quit at this point, you have to Ctrl-C it to get out. Twice. This loses history.
What version of the product are you using? On what operating system?
https://hg.prosody.im/trunk/rev/6fbbfa4a1178
debian 10
Please provide any additional information below.
MattJ
on
Changes
tags Priority-High
Jonas Schäfer
on
So the problem with this is that while the prosody server shuts down, prosody is actually stuck in a read() call on stdin (either in readline or in io.read).
As someone who's previously tried to integrate readline in an python asyncio event loop… I'd say "no" to that one. The best one could do is improve the behaviour when the disconnect is then noticed after the attempt to send something, which https://hg.prosody.im/contrib/rev/1d4aee27507a does.
Zash
on
Fixed by jonas in https://hg.prosody.im/trunk/rev/84fd6a79cda7
Future work could explore async processing to notice the disconnect immediately, but let's not block the release on that. Much larger task I suspect.
What steps will reproduce the problem? 1. Open the shell 2. Restart the server 3. Do something in the shell What is the expected output? Shell should have noticed the shutdown and disconnected What do you see instead? prosody> foo:bar() adminstream info Admin client disconnected: closed Note: Shell doesn't quit at this point, you have to Ctrl-C it to get out. Twice. This loses history. What version of the product are you using? On what operating system? https://hg.prosody.im/trunk/rev/6fbbfa4a1178 debian 10 Please provide any additional information below.
So the problem with this is that while the prosody server shuts down, prosody is actually stuck in a read() call on stdin (either in readline or in io.read). As someone who's previously tried to integrate readline in an python asyncio event loop… I'd say "no" to that one. The best one could do is improve the behaviour when the disconnect is then noticed after the attempt to send something, which https://hg.prosody.im/contrib/rev/1d4aee27507a does.
Fixed by jonas in https://hg.prosody.im/trunk/rev/84fd6a79cda7 Future work could explore async processing to notice the disconnect immediately, but let's not block the release on that. Much larger task I suspect.
Changes