TReKiE / msnp-sharp

Automatically exported from code.google.com/p/msnp-sharp
0 stars 0 forks source link

All P2P transfers trigger a P2PTransferSession.TransferAborted event #40

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
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

GoogleCodeExporter commented 9 years ago

Original comment by freezing...@gmail.com on 3 Nov 2008 at 1:45

GoogleCodeExporter commented 9 years ago

Original comment by hepha...@gmail.com on 18 Nov 2008 at 9:16

GoogleCodeExporter commented 9 years ago

Original comment by hepha...@gmail.com on 23 Jan 2009 at 5:36