#1671 shell client does not notice disconnect

Reporter Zash
Owner Nobody
Created
Updated
Stars ★★ (2)
Tags
  • Milestone-0.12
  • Type-Defect
  • Priority-High
  • Status-Fixed
  1. Zash on

    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.

  2. MattJ on

    Changes
    • tags Priority-High
  3. 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.

  4. 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.

    Changes
    • tags Status-Fixed

New comment

Not published. Used for spam prevention and optional update notifications.