tcp: add timeout to prevent buggy client from hanging.