Commit ec8911e3 authored by Guido van Rossum's avatar Guido van Rossum

8096 is not a magic number. 8192 is.

parent 4ff0c9ad
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
############################################################################## ##############################################################################
"""Sized message async connections """Sized message async connections
$Id: smac.py,v 1.32 2002/09/29 07:51:37 gvanrossum Exp $ $Id: smac.py,v 1.33 2002/10/02 19:54:02 gvanrossum Exp $
""" """
import asyncore, struct import asyncore, struct
...@@ -56,7 +56,7 @@ class SizedMessageAsyncConnection(asyncore.dispatcher): ...@@ -56,7 +56,7 @@ class SizedMessageAsyncConnection(asyncore.dispatcher):
socket = None # to outwit Sam's getattr socket = None # to outwit Sam's getattr
READ_SIZE = 8096 READ_SIZE = 8192
def __init__(self, sock, addr, map=None, debug=None): def __init__(self, sock, addr, map=None, debug=None):
self.addr = addr self.addr = addr
...@@ -93,7 +93,7 @@ class SizedMessageAsyncConnection(asyncore.dispatcher): ...@@ -93,7 +93,7 @@ class SizedMessageAsyncConnection(asyncore.dispatcher):
try: try:
# Use a single __inp buffer and integer indexes to make this fast. # Use a single __inp buffer and integer indexes to make this fast.
try: try:
d = self.recv(8096) d = self.recv(8192)
except socket.error, err: except socket.error, err:
if err[0] in expected_socket_read_errors: if err[0] in expected_socket_read_errors:
return return
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment