Fix bugs in cloudi_service_tcp.