fix #4231: crash when host name is null
Merge branch 'release' into upstream