`get-hostname`: remove unnecessary promise, add max blocking time