Uploaded image for project: 'MongoDB Shell'
  1. MongoDB Shell
  2. MONGOSH-1248

Exiting for a disconnected MongoSH blocks for some time

    • Type: Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Priority: Icon: Minor - P4 Minor - P4
    • No version
    • Affects Version/s: None
    • Component/s: Connectivity
    • Environment:
      OS:
      node.js / npm versions:
      Additional info:
    • Not Needed

      Problem Statement/Rationale


      If I have connected MongoSH against a running server (there is the topology/DB message on the prompt), then I shut down the server and press enter on the prompt, MongoSH realises that it is disconnected.

      If I type exit at this point, it will get stuck for some time before exiting. The problem doesn't occur if I type exit before pressing enter after shutting down the server (i.e., before MongoSH has realised that it has disconnected).

      Example:

      Enterprise [direct: mongos] MDBW22>
      
      Enterprise MDBW22> exit^C^C
      Stopping execution...
      Enterprise MDBW22>
      
      Enterprise MDBW22> exit
      

      Steps to Reproduce


      Connect MongoSH to a server. Shut down the server. Press ENTER on the MongoSH prompt, then type 'exit'.

            Assignee:
            Unassigned Unassigned
            Reporter:
            kaloian.manassiev@mongodb.com Kaloian Manassiev
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: