diff options
author | Teddy <[email protected]> | 2013-08-28 22:07:06 +0800 |
---|---|---|
committer | Teddy <[email protected]> | 2013-08-28 22:07:06 +0800 |
commit | 7e58f885951d768dc0cd91e0133ff905f15aa795 (patch) | |
tree | a5f3086f9c29ee94ecfefdc05723876d7f2e7d1f /server | |
parent | 55640ca3ae84743ffea43ac7854bf9fc37e9ffd8 (diff) |
fixed no reply bug
Diffstat (limited to 'server')
-rw-r--r-- | server/piztor/server.py | 4 |
1 files changed, 2 insertions, 2 deletions
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") |