Tentative fix for the collectd writer

The thread would quit when connection fails.