network: Server send buffer should be bytes, not unicode (#241)

This commit is contained in:
Stein Magnus Jodal 2012-11-14 18:12:44 +01:00
parent 75f7fc273a
commit 8a440fff3f

View File

@ -140,7 +140,7 @@ class Connection(object):
self.timeout = timeout
self.send_lock = threading.Lock()
self.send_buffer = ''
self.send_buffer = b''
self.stopping = False
@ -193,7 +193,7 @@ class Connection(object):
if e.errno in (errno.EWOULDBLOCK, errno.EINTR):
return data
self.stop('Unexpected client error: %s' % e)
return ''
return b''
def enable_timeout(self):
"""Reactivate timeout mechanism."""