"File Transfer Connection Listener" hangs - bug?

I’'m using Smack to do file sending/receiving, but having a problem with the sending client. After I finish sending a file and quit my application, it hangs. The receiving client quits gracefully.

Dumping my thread list, I found the difference to be a “Thread[File Transfer Connection Listener,5,main]”. Searching the Smack source I found it in a private inner class called ProxyProcess inside org.jivesoftware.smackx.filetransfer.Socks5TransferNegotiator.

What I’‘m suspecting here is when I complete my transfers, the thread goes into a wait (Line 677). The only two notify() in the class is in the addTransfer() method, which is called when a new transfer comes in, or the stop() method. Surprisingly the stop() method was never called within the class, nor within the Negotiator. Since it is a private inner class I’'m not expecting it to be called anywhere else.

Can someone verify this bug? Or suggest a workaround?

Yea, this is defintly a bug. I am going to work on a cleanup method that will clean that thread out.

Here is an issue to track my progress: