TcpChannel has a property "timeout". The property "timeout" is an integer that specifies the number of milliseconds to wait before a request times out. 0 or -1 indicates an infinite timeout period. The default is Infinite.
I set this property to some timeout value, since the default is to wait infinitely. I'm not sure whether this solves the problem though.
