Skip to content

socket.detach implementation has issues #1224

@slozier

Description

@slozier

The socket.detach implementation sets the underlying C# socket to null, but none of the code is set up to deal with it, this causes most methods to fail with SystemError. For example:

import _socket
s = _socket.socket()
s.detach()
assert s.fileno() == -1

fails with:

SystemError: Object reference not set to an instance of an object.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions