Merge lp:~stefanor/ibid/reconnect-396634 into lp:~ibid-core/ibid/old-trunk-pack-0.92

Proposed by Stefano Rivera
Status: Merged
Approved by: Jonathan Hitchcock
Approved revision: 693
Merged at revision: 698
Proposed branch: lp:~stefanor/ibid/reconnect-396634
Merge into: lp:~ibid-core/ibid/old-trunk-pack-0.92
Diff against target: None lines
To merge this branch: bzr merge lp:~stefanor/ibid/reconnect-396634
Reviewer Review Type Date Requested Status
Jonathan Hitchcock Approve
Michael Gorven Approve
Review via email: mp+8376@code.launchpad.net

This proposal supersedes a proposal from 2009-07-08.

To post a comment you must log in.
Revision history for this message
Stefano Rivera (stefanor) wrote : Posted in a previous version of this proposal

I think this will fix the multiple-personality-syndrome that Ibid sometimes gets.

My guess is that when it excepts during "disconnect from" it doesn't clean up properly.

Thus when you reconnect, you now have a reconnecting factory that's still trying to connect in the background.

Howover, my twisted-fu isn't very strong. Is this right?

Revision history for this message
Michael Gorven (mgorven) wrote : Posted in a previous version of this proposal

This doesn't really make sense to me. All this seems to achieve is to prevent
an exception if the factory doesn't have a proto instance, but if this is the
case it surely can't be connected or even trying to connect? So the only time
this should happen is if it is fully disconnected.

Revision history for this message
Stefano Rivera (stefanor) wrote : Posted in a previous version of this proposal

OK, this one should make sense :)

Revision history for this message
Michael Gorven (mgorven) wrote :

 review approve

review: Approve
Revision history for this message
Jonathan Hitchcock (vhata) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'ibid/source/dc.py'
2--- ibid/source/dc.py 2009-05-02 14:51:09 +0000
3+++ ibid/source/dc.py 2009-07-08 09:34:09 +0000
4@@ -177,7 +177,8 @@
5 def disconnect(self):
6 self.stopTrying()
7 self.stopFactory()
8- self.proto.transport.loseConnection()
9+ if hasattr(self, 'proto'):
10+ self.proto.transport.loseConnection()
11 return True
12
13 def _dc_auth_callback(self, nick, result):
14
15=== modified file 'ibid/source/irc.py'
16--- ibid/source/irc.py 2009-07-04 11:49:45 +0000
17+++ ibid/source/irc.py 2009-07-08 09:34:09 +0000
18@@ -226,7 +226,8 @@
19 def disconnect(self):
20 self.stopTrying()
21 self.stopFactory()
22- self.proto.transport.loseConnection()
23+ if hasattr(self, 'proto'):
24+ self.proto.transport.loseConnection()
25 return True
26
27 def join(self, channel):

Subscribers

People subscribed via source and target branches