mirror of
https://github.com/frappe/gunicorn.git
synced 2026-01-14 11:09:11 +08:00
socket.from_fd return a _socket.socket object instead of socket.socket
(at least on py26). Instead of testing type of instance, just test if the source has a "recv" method. Fix bug in usr2 with new parser.
This commit is contained in:
parent
05b6281e8d
commit
d5b76ac651
@ -11,7 +11,7 @@ from gunicorn.http.unreader import SocketUnreader, IterUnreader
|
||||
class Parser(object):
|
||||
def __init__(self, mesg_class, source):
|
||||
self.mesg_class = mesg_class
|
||||
if isinstance(source, socket.socket):
|
||||
if hasattr(source, "recv"):
|
||||
self.unreader = SocketUnreader(source)
|
||||
else:
|
||||
self.unreader = IterUnreader(source)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user