0

I use lwuit and browser about 20 pages, and then i got execption:

java.io.IOException: Resource limit exceeded for TCP client sockets - com.sun.midp.io.j2me.socket.Protocol.open0(), bci=0 - com.sun.midp.io.j2me.socket.Protocol.connect(), bci=142 - com.sun.midp.io.j2me.socket.Protocol.open(), bci=133 - com.sun.midp.io.j2me.socket.Protocol.openPrim(), bci=4 - com.sun.midp.io.j2me.http.Protocol.createConnection(), bci=13 - com.sun.midp.io.j2me.http.Protocol.connect(), bci=43 - com.sun.midp.io.j2me.http.Protocol.streamConnect(), bci=109 - com.sun.midp.io.j2me.http.Protocol.startRequest(), bci=9 - com.sun.midp.io.j2me.http.Protocol.sendRequest(), bci=35 - com.sun.midp.io.j2me.http.Protocol.sendRequest(), bci=3 - com.sun.midp.io.j2me.http.Protocol.getHeaderField(), bci=5 - com.sun.lwuit.browser.HttpRequestHandler.resourceRequested(HttpRequestHandler.java:138) - com.sun.lwuit.html.HTMLComponent$2.run(HTMLComponent.java:817) HttpRequestHandler->IOException: Resource limit exceeded for TCP client sockets Error connecting to stream

anyone can tell me how to fix it?

leeboo
  • 1
  • 1

1 Answers1

0

You should probably close the TCP sockets after using them. Otherwise they stay around in an open state, and if the operating system allows only 20 connections to be open at a time, you will get this exception.

Roland Illig
  • 40,703
  • 10
  • 88
  • 121