We keep repeating ourselves, let's move that into a helper instead. In order to get a sane host, we fix the listener to 127.0.0.1 else we get the unspecified :: ipv6 addr (on suitable hosts), which isn't useful.
Co-authored-by: Eric Nemchik <eric@nemchik.com> Co-authored-by: Pavel Djundik <xPaw@users.noreply.github.com>