This thread is archived
4 Replies Last post: Mar 29, 2006 2:55 PM by Alex Wenckus  
keith.lirette Bronze 33 posts since
Mar 29, 2006
Currently Being Moderated

Mar 29, 2006 10:44 AM

IncomingFileTransfer never isDone()

I am implementing File Transfer and have an issue where an IncomingFileTransfer never returns a true isDone().  The sender OutgoingFileTransfer correctly gets a true result from isDone() and the file is successfully transferred.  The getStatus() on the receiver continually returns IN_PROGRESS.

 

transfer.recieveFile(file);

 

while (!transfer.isDone()) {

     try {

          Thread.sleep(500);

          if (transfer.getStatus() == FileTransfer.Status.COMPLETE) {

             &n bsp; System.out.println("Transfer COMPLETE");

          }

          else if (transfer.getStatus() == FileTransfer.Status.IN_PROGRESS) {

             &n bsp; System.out.println("Transfer IN PROGRESS");

          }

          else if (transfer.getStatus() == FileTransfer.Status.ERROR) {

             &n bsp; System.out.println("Transfer ERROR");

          }

     } catch (InterruptedException e) {

     }

}

 

Thoughts?

 

Thanks,

 

Pony

Alex Wenckus Jiver 1,029 posts since
Jan 13, 2005
Currently Being Moderated
Mar 29, 2006 11:34 AM in response to: keith.lirette
Re: IncomingFileTransfer never isDone()

I am looking into this issue, in the mean time could you post any output you have in the smack debugger.

 

Thanks,

Alex

Alex Wenckus Jiver 1,029 posts since
Jan 13, 2005
Currently Being Moderated
Mar 29, 2006 2:55 PM in response to: keith.lirette
Re: IncomingFileTransfer never isDone()

I should have noticed that when you first posted. I''ll look into making the fact more clear in the docs.

 

Cheers,

Alex

More Like This

  • Retrieving data ...