Changed sleep time in main thread for faster shutdown when using
stdin message input and sdtin reaches EOF.