changed to for-range to prevent infinite looping in case channel closes
changed to for-range to prevent infinite looping in case channel closes

Change-Id: I25df4116ceffd6ecb1f5d5b89ab8c2c8ecb165ea

cloudfoundry-attic/gonatsd,cloudfoundry-attic/gonatsd,cloudfoundry-attic/gonatsd