Fixed logging over TCP

Due to a mistake in the code, logging via TCP would fail because winston-syslog would write to the socket before it was connected. I updated the code to reflect the intention indicated in the comment, and now it works.