If bitcoind is misconfigured this line produces an endless loop without information to the user what the problem is: https://github.com/bitcoin/bitcoin/blob/master/src/bitcoin-cli.cpp#L213
An appropriate behaviour would be throwing an error: request not allowed or not known something like that.