Add a ping/pong mechanism for the shell client

Restart the shell client if it becomes unresponsive