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

Proposed by Stefano Rivera
Status: Superseded
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
Ibid Core Team Pending
Review via email: mp+8320@code.launchpad.net

This proposal has been superseded by a proposal from 2009-07-08.

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

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 :

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.

lp:~stefanor/ibid/reconnect-396634 updated
693. By Stefano Rivera

Gracefully handle TCP connections that aren't up yet, when shutting down

Unmerged revisions

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-07 16:21:15 +0000
4@@ -177,7 +177,8 @@
5 def disconnect(self):
6 self.stopTrying()
7 self.stopFactory()
8- self.proto.transport.loseConnection()
9+ if self.hasattr('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-07 16:21:15 +0000
18@@ -226,7 +226,8 @@
19 def disconnect(self):
20 self.stopTrying()
21 self.stopFactory()
22- self.proto.transport.loseConnection()
23+ if self.hasattr('proto'):
24+ self.proto.transport.loseConnection()
25 return True
26
27 def join(self, channel):
28
29=== modified file 'ibid/source/manhole.py'
30--- ibid/source/manhole.py 2009-06-27 22:55:51 +0000
31+++ ibid/source/manhole.py 2009-07-07 16:21:15 +0000
32@@ -27,7 +27,8 @@
33 return self.setServiceParent(None)
34
35 def disconnect(self):
36- self.listener.stopListening()
37+ if self.hasattr('listener'):
38+ self.listener.stopListening()
39 return True
40
41 # vi: set et sta sw=4 ts=4:
42
43=== modified file 'ibid/source/telnet.py'
44--- ibid/source/telnet.py 2009-07-03 17:20:45 +0000
45+++ ibid/source/telnet.py 2009-07-07 16:21:15 +0000
46@@ -71,7 +71,8 @@
47 return self.setServiceParent(None)
48
49 def disconnect(self):
50- self.listener.stopListening()
51+ if self.hasattr('listener'):
52+ self.listener.stopListening()
53 return True
54
55 # vi: set et sta sw=4 ts=4:

Subscribers

People subscribed via source and target branches