When using jcraft's jsch ssh2 port forwarding in a gcj compiled application, connections terminate unexpectedly. It works fine in Sun's java.
I've tried to make a test case with HServer/HClient. The server listens to a port, and then the client connects to it. The OutputStream is closed while the InputStream is still reading in another thread. --- On Sun's Java (win32 or linux): HServer: java.net.SocketException: Socket closed at java.net.SocketInputStream.read(SocketInputStream.java:162) at HServer$1.run(HServer.java:29) HClient: READ: 12 --- Win32 GCJ 4.0.2 (thisiscool.com) Hserver: java.io.IOException: An established connection was aborted by the software in your host machine. at .__ZN9HServer$13runEv (E:\dev\TURL\HServer.java) HClient: java.io.IOException: An existing connection was forcibly closed by the remote host. at .__ZN7HClient4mainEP6JArrayIPN4java4lang6StringEE (E:\dev\TURL\HClient.java) at ._main (C:\WINDOWS\TEMP\cc88aaaa.i) ---- GCJ Linux: Hserver: java.io.IOException: Bad file descriptor at HServer$1.run (HServer) HClient: READ: 12 ------- -- Summary: Socket problems Product: gcc Version: 4.0.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libgcj AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: ovidr at users dot sourceforge dot net http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25593