Bugfix: hostname was always undefined

All hosts were listed as connections.out_by_host.undefined. This commit fixes that.