Merge pull request #262 from aagten/bugfix/windows-proof-sockets

Make socket Windows-proof
This commit is contained in:
Kubernetes Prow Robot 2021-11-09 19:57:26 -08:00 committed by GitHub
commit 3aa8b4c942
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -280,7 +280,7 @@ class PortForward:
# between the python application and the kubernetes websocket. The self.python
# half of the socket pair is used by the _proxy method to receive and send data
# to the running python application.
s, self.python = socket.socketpair(socket.AF_UNIX, socket.SOCK_STREAM)
s, self.python = socket.socketpair()
# The self.socket half of the pair is used by the python application to send
# and receive data to the eventual pod port. It is wrapped in the _Socket class
# because a socket pair is an AF_UNIX socket, not a AF_INET socket. This allows