fix infinite loop
Merge remote-tracking branch 'origin/master' into native-tls

* origin/master:
  fix infinite loop