Quantcast
Channel: Ignite Realtime: Message List
Viewing all articles
Browse latest Browse all 11593

Re: File Transfer fails on Smack 4.1.0-beta 1

$
0
0

Below is my client test result using smack-4.1.0-beta2-SNAPSHOT-2015-01-14:

Debugging/single-stepping into the receiveFile,  I have observed  streamNogotiatorTask,get(..)   throws an ExecutionException  "Error in execution". 

 

To contrast, when using PSI client to receive and negotiate the exact same file transfer, PSI functions without error.   Of course PSI is not a Smack implementation but the fact that beta2 cannot handle receiving a file provides additional proof there is problem with the receiveFile implementation of Smack.

 

My beta2 client calls receiveFile:

 

  • public void recieveFile(final File file) throws SmackException, IOException

 

receiveFile then calls negotiateStream:

 

  • private InputStream negotiateStream() throws SmackException, XMPPErrorException

 

streamNegotiatorTask.run();

InputStream inputStream;
try {

  inputStream = (InputStream)streamNegotiatorTask.get(15L, TimeUnit.SECONDS);
} catch (InterruptedException var10) {

   throw new SmackException("Interruption while executing", var10);
} catch (ExecutionException var11) {

   throw new SmackException("Error in execution", var11);   // <<=== Fails to receive file, throws here
} catch (TimeoutException var12) {

   throw new SmackException("Request timed out", var12);
} finally {

  streamNegotiatorTask.cancel(true);
}


Viewing all articles
Browse latest Browse all 11593

Trending Articles