From 7e58f885951d768dc0cd91e0133ff905f15aa795 Mon Sep 17 00:00:00 2001 From: Teddy Date: Wed, 28 Aug 2013 22:07:06 +0800 Subject: fixed no reply bug --- server/piztor/server.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'server') diff --git a/server/piztor/server.py b/server/piztor/server.py index 6ebdc6f..bb88b53 100644 --- a/server/piztor/server.py +++ b/server/piztor/server.py @@ -596,14 +596,14 @@ class PTP(Protocol, TimeoutMixin): return h = PTP.handlers[self.optcode]() reply = h.handle(self.buff[5:], self) + logger.info("Wrote: %s", get_hex(reply)) + self.transport.write(reply) if self.tunnel: logger.info("Blocking the client...") self.buff = bytes() self.length = -1 self.setTimeout(None) return - logger.info("Wrote: %s", get_hex(reply)) - self.transport.write(reply) self.transport.loseConnection() elif len(self.buff) > self.length: raise BadReqError("The actual length is larger than promised") -- cgit v1.2.3-70-g09d2