Having trouble reading IBB inputstream from receiveFile()

Hi Smack Community,

I’m having trouble figuring with receiving a file when the negotiation picks IBB. I’m using the 3.2.1 download and I can receive a file from a client that only supports Socks5, but when a client picks IBB the code hangs on the inputstream because there is no data available, no EOF indication, etc.

I put up another post asking how to disable IBB on the receiving end, as this would solve my problem. If that’s not an option, I’d like to figure out if this is a bug with receiving IBB-based files or another problem.

Thanks,

Bob

I didn’t have any issues when testing this. Are you using receiveFile() or receiveFile(myFile)? The first will require you to read the input stream in your own thread or it will block the packet reader. The second does this for you.

Thanks! I happen to find an answer with the blocked packet reader in another post. I was already planning spawn the logic for handling individual file transfers in an executorservice - which fixed the problem.

-bob