shikhar/sshj — Issue #53: rport forwarding - disconnects
Author: pottedplant
Created: 2012-01-12 13:58:02+00:00
State: open

hi,

while using sshj against openssh with rport forwarding enabled

```java
sshClient.getRemotePortForwarder().bind(new Forward(p), new SocketForwardingConnectListener(new InetSocketAddress("localhost", localPort)));
```
i am getting a lot of disconnects (after some minutes, but never got it to an hour)

server log:

```
Jan 12 14:14:42 catbox sshd[11942]: channel_by_id: 3: bad id: channel free
Jan 12 14:14:42 catbox sshd[11942]: Disconnecting: Received data for nonexistent channel 3.
```

client log:

```
2012-01-12 14:37:11,235 ERROR [net.schmizz.sshj.transport.TransportImpl] Dying because - net.schmizz.sshj.transport.TransportException: [PROTOCOL_ERROR] Disconnected; server said: Received data for nonexistent channel 3.
2012-01-12 14:37:20,785 ERROR [net.schmizz.sshj.common.StreamCopier] In pipe from java.net.SocketInputStream@4434d2ab to < ChannelOutputStream for Channel #0 >: net.schmizz.sshj.transport.TransportException: Broken pipe
2012-01-12 14:37:20,785 ERROR [net.schmizz.sshj.transport.TransportImpl] Dying because - net.schmizz.sshj.transport.TransportException: Broken pipe
2012-01-12 14:37:20,786 ERROR [net.schmizz.concurrent.Promise] <> woke to: net.schmizz.sshj.transport.TransportException: Broken pipe
```