write_tsdb: enable TCP keepalive on network socket