Index: trunk/extensions/XMLRC/bridge/udp2xmpp.py |
— | — | @@ -347,8 +347,14 @@ |
348 | 348 | self.on_connect() |
349 | 349 | |
350 | 350 | def close( self ): |
351 | | - self.jabber.disconnect() |
| 351 | + # self.jabber.disconnect() #wha?? |
| 352 | + # XXX: leave chat rooms, etc? |
352 | 353 | |
| 354 | + sock = self.get_socket() |
| 355 | + if sock: sock.close() |
| 356 | + |
| 357 | + self.debug("closed xmpp socket") |
| 358 | + |
353 | 359 | def make_jabber_channel( self, jid ): |
354 | 360 | return JabberChannel( self, jid ) |
355 | 361 | |
— | — | @@ -427,6 +433,9 @@ |
428 | 434 | def close( self ): |
429 | 435 | if self.socket != sys.stdin: |
430 | 436 | self.socket.close() |
| 437 | + self.debug("closed command socket") |
| 438 | + else: |
| 439 | + self.debug("not closing stdin") |
431 | 440 | |
432 | 441 | def process(self): |
433 | 442 | msg = self.socket.readline().strip() |
— | — | @@ -450,6 +459,7 @@ |
451 | 460 | |
452 | 461 | def close( self ): |
453 | 462 | self.socket.close() |
| 463 | + self.debug("closed UDP socket") |
454 | 464 | |
455 | 465 | def process(self): |
456 | 466 | packet = self.socket.recvfrom( self.buffer_size ) |