Make hostname update become effective immediately

Signed-off-by: apporc <appleorchard2000@gmail.com>