r70929 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r70928‎ | r70929 | r70930 >
Date:08:30, 12 August 2010
Author:daniel
Status:deferred
Tags:
Comment:
make sure /quit works
Modified paths:
  • /trunk/extensions/XMLRC/bridge/udp2xmpp.py (modified) (history)

Diff [purge]

Index: trunk/extensions/XMLRC/bridge/udp2xmpp.py
@@ -347,8 +347,14 @@
348348 self.on_connect()
349349
350350 def close( self ):
351 - self.jabber.disconnect()
 351+ # self.jabber.disconnect() #wha??
 352+ # XXX: leave chat rooms, etc?
352353
 354+ sock = self.get_socket()
 355+ if sock: sock.close()
 356+
 357+ self.debug("closed xmpp socket")
 358+
353359 def make_jabber_channel( self, jid ):
354360 return JabberChannel( self, jid )
355361
@@ -427,6 +433,9 @@
428434 def close( self ):
429435 if self.socket != sys.stdin:
430436 self.socket.close()
 437+ self.debug("closed command socket")
 438+ else:
 439+ self.debug("not closing stdin")
431440
432441 def process(self):
433442 msg = self.socket.readline().strip()
@@ -450,6 +459,7 @@
451460
452461 def close( self ):
453462 self.socket.close()
 463+ self.debug("closed UDP socket")
454464
455465 def process(self):
456466 packet = self.socket.recvfrom( self.buffer_size )

Status & tagging log