Guy Korland wrote:
Hi,
It seems like the following code causes an endless loop in some cases.
for (;;) {
InetAddress ia = isa.getAddress();
if (ia.isAnyLocalAddress())
ia = InetAddress.getLocalHost();
n = Net.connect(fd, ia, isa.getPort(),trafficClass);
if ((n == IOStatus.INTERRUPTED)
&& isOpen())
continue;
break;
}
Guy
I haven't seen this code cause problems before. Do you have an example
that demonstrates this? If so, which operating system? I assume for this
to loop the channel must be configured blocking and the connect is
interrupted. Have you run with truss, strace, or equivalent to see if
this is so.
-Alan.