Closed GoogleCodeExporter closed 9 years ago
I wonder if that might accidently clear listeners that the framework has set
internally.
Perhaps only allow clearing of listeners of a specific type, like
peerGroup.clearEventListeners(MyListener.class);
Original comment by andreas....@gmail.com
on 8 Jul 2013 at 8:52
[deleted comment]
The reason I added this is because I am restarting PeerGroup when something
blows up so before i call stopAndWait method, I clear all listeners from it
first.
Original comment by alexande...@gmail.com
on 8 Jul 2013 at 9:23
Clearing all listeners before it's stopped might cause weirdness, I'm thinking
maybe what Andreas suggested is better.
What do you mean by "blows up", exactly? Perhaps we can fix this issue with
better exception handling?
Original comment by hearn@google.com
on 9 Jul 2013 at 12:51
I have implemented PeerEventListener.onException and inside there whenever an
exception from my app is get caught i restart peer group (by creating a new
object) but I remove the event listeners first in order to ensure that I won't
create any memory leaks.
Maybe i am wrong thought and calling stopAndWait() and then creating a new
PeerGroup will be just fine :)
Original comment by alexande...@gmail.com
on 9 Jul 2013 at 1:43
This issue was closed by revision 2c26f8802b01.
Original comment by hearn@google.com
on 11 Jul 2013 at 2:35
Original issue reported on code.google.com by
alexande...@gmail.com
on 8 Jul 2013 at 8:43