Properly disconnect shell socket
Merge pull request #208 from mistio/shell_socket_fix

Properly disconnect shell socket