From 592565d863fda7eaafd9ec69d6086c2ec0eeac07 Mon Sep 17 00:00:00 2001 From: jchu Date: Mon, 13 Dec 2004 03:45:40 +0000 Subject: made it a nicer error message --- tupkg/server/tupkgs | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'tupkg/server') diff --git a/tupkg/server/tupkgs b/tupkg/server/tupkgs index f3f31ea6..5eac499a 100755 --- a/tupkg/server/tupkgs +++ b/tupkg/server/tupkgs @@ -164,11 +164,17 @@ class ClientSocket(threading.Thread): print self.readMsg() def run(self): - if not self.auth(): - self.close() - return - self.readFileMeta() - self.readFiles() + try: + if not self.auth(): + self.close() + return + self.readFileMeta() + self.readFiles() + except RuntimeError, err: + if err.__str__() == "socket connection broken": + print "Client disconnected, cleaning up" + self.close() + return class ServerSocket(threading.Thread): def __init__(self, db, port, maxqueue, **other): -- cgit v1.2.3-24-g4f1b