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
=== modified file 'ibid/source/dc.py'
--- ibid/source/dc.py 2009-05-02 14:51:09 +0000
+++ ibid/source/dc.py 2009-07-08 09:34:09 +0000
@@ -177,7 +177,8 @@
177 def disconnect(self):177 def disconnect(self):
178 self.stopTrying()178 self.stopTrying()
179 self.stopFactory()179 self.stopFactory()
180 self.proto.transport.loseConnection()180 if hasattr(self, 'proto'):
181 self.proto.transport.loseConnection()
181 return True182 return True
182183
183 def _dc_auth_callback(self, nick, result):184 def _dc_auth_callback(self, nick, result):
184185
=== modified file 'ibid/source/irc.py'
--- ibid/source/irc.py 2009-07-04 11:49:45 +0000
+++ ibid/source/irc.py 2009-07-08 09:34:09 +0000
@@ -226,7 +226,8 @@
226 def disconnect(self):226 def disconnect(self):
227 self.stopTrying()227 self.stopTrying()
228 self.stopFactory()228 self.stopFactory()
229 self.proto.transport.loseConnection()229 if hasattr(self, 'proto'):
230 self.proto.transport.loseConnection()
230 return True231 return True
231232
232 def join(self, channel):233 def join(self, channel):

Subscribers

People subscribed via source and target branches