Skip to content

Commit

Permalink
remove socketfromfd module
Browse files Browse the repository at this point in the history
socket.fromfd using socket.AF_UNIX as type should be enough to be
cross-platform since the address is larger than for others family.
This should allow the code to work cross-platform.
  • Loading branch information
benoitc committed Nov 26, 2019
1 parent c583377 commit 67cb620
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 111 deletions.
3 changes: 1 addition & 2 deletions gunicorn/sock.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
import time

from gunicorn import util
from gunicorn.socketfromfd import fromfd


class BaseSocket(object):
Expand Down Expand Up @@ -168,7 +167,7 @@ def create_sockets(conf, log, fds=None):
# sockets are already bound
if fdaddr:
for fd in fdaddr:
sock = fromfd(fd)
sock = socket.fromfd(fd, socket.AF_UNIX, socket.SOCK_STREAM)
sock_name = sock.getsockname()
sock_type = _sock_type(sock_name)
listener = sock_type(sock_name, conf, log, fd=fd)
Expand Down
109 changes: 0 additions & 109 deletions gunicorn/socketfromfd.py

This file was deleted.

0 comments on commit 67cb620

Please sign in to comment.