Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Mar 13, 2022. It is now read-only.
This repository was archived by the owner on Mar 13, 2022. It is now read-only.

stream/ws_client.py doesn't close the connection if _preload_content is True #53

@saurabh-chordiya

Description

@saurabh-chordiya

Using kubernetes-4.0.0 python client and exec call as below:-

stream( api.connect_get_namespaced_pod_exec,
name=pod_name, namespace=namespace, command=cmd,
stderr=True, stdin=False, stdout=True, tty=False)

After this call it returns output as a string and not closing connection so If I use it in scale env then I see below error:-
filedescriptor out of range in select

So IMO ws_client.py should be fixed from below code snippet to close connection before return:-
client.run_forever(timeout=_request_timeout)
return WSResponse('%s' % ''.join(client.read_all()))

Please fix this if my observation is correct here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    lifecycle/rottenDenotes an issue or PR that has aged beyond stale and will be auto-closed.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions