What steps will reproduce the problem?
1. Cause a P2P transfer to be created. I did this by sending a custom
emoticon to MSNPSharp.
2. After the transfer has successfully completed (a few seconds), disconnect
MSNPSharp from the server.
What is the expected output? What do you see instead?
The expected output is to not see any P2PTransferSession.TransferAborted
events being fired. Instead, every P2P transfer that has occurred while
connected will trigger a TransferAborted event.
What version of the product are you using? On what operating system?
Rev 456 (trunk), Windows XP Pro.
Please provide any additional information below.
When MSNPSharp disconnects, P2PMessageSession.AbortAllTransfers() is invoked
to clean-up any outstanding transfers. However, sessions are never actually
removed from the hashtable, resulting in the problem.
In MSNPSharp.DataTransfer.P2PMessageSession.RemoveTransferSession(), change
transferSessions.Remove(session);
to
transferSessions.Remove(session.SessionId);
Additionally, MSNPSharp.DataTransfer.P2PMessageSession.AbortAllTransfers
needs to be refactored because it can't enumerate the collection at the same
time that it is calling session.AbortTransfer, because that causes the
iterated collection to be modifed.
Original issue reported on code.google.com by its....@gmail.com on 1 Nov 2008 at 3:36
Original issue reported on code.google.com by
its....@gmail.com
on 1 Nov 2008 at 3:36