[Telepathy-commits] [telepathy-idle/master] Make the test server respond to QUIT messages properly

Jonathon Jongsma jonathon.jongsma at collabora.co.uk
Fri Feb 13 17:43:17 PST 2009


Previously I was just closing the connection immediately upon receiving a QUIT
message, but I should have been sending an ERROR response and then closing the
connection.
---
 tests/twisted/idletest.py |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/tests/twisted/idletest.py b/tests/twisted/idletest.py
index 72b1a3b..0617f18 100644
--- a/tests/twisted/idletest.py
+++ b/tests/twisted/idletest.py
@@ -75,6 +75,8 @@ class BaseIRCServer(irc.IRC):
         self.sendMessage('366', self.nick, room, ':End if /NAMES list', prefix='idle.test.server')
 
     def handleQUIT(self, args, prefix):
+        quit_msg = ' '.join(args).rstrip('\r\n')
+        self.sendMessage('ERROR', ':Closing Link: idle.test.server (Quit: %s)' % quit_msg)
         self.transport.loseConnection()
 
     def sendWelcome(self):
-- 
1.5.6.5




More information about the telepathy-commits mailing list