meinheld icon indicating copy to clipboard operation
meinheld copied to clipboard

msocket.py setsockopt error

Open RandomOS opened this issue 8 years ago • 0 comments

  • python 2.7.12
  • meinheld 0.6.1

POC

#!/usr/bin/env python
# -*- coding: utf-8 -*-

from meinheld import patch
patch.patch_all()
from logging.handlers import SysLogHandler

SysLogHandler({'address': ('127.0.0.1', 5140)})

Result

Traceback (most recent call last):
  File "test.py", line 8, in <module>
    SysLogHandler({'address': ('127.0.0.1', 5140)})
  File "/opt/python27/lib/python2.7/logging/handlers.py", line 766, in __init__
    self.socket = socket.socket(socket.AF_INET, socktype)
  File "/opt/python27/lib/python2.7/site-packages/meinheld/msocket.py", line 524, in __init__
    self.setsockopt(IPPROTO_TCP, TCP_NODELAY, 1)
  File "<string>", line 1, in setsockopt
socket.error: [Errno 92] Protocol not available

IPPROTO_TCP, TCP_NODELAY is not imported.

RandomOS avatar Sep 07 '17 18:09 RandomOS