Skip to content

Close connection when exception is raised #8

@athoune

Description

@athoune

Describe the bug
When server returns error, client doesn't close socket.

ResourceWarning: Enable tracemalloc to get the object allocation traceback
/usr/lib/python3.7/socket.py:660: ResourceWarning: unclosed <socket.socket fd=9, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=6, laddr=('172.27.0.3', 42192), raddr=('172.27.0.2', 1491)>
  self._sock = None

Expected behavior
connection is closed before raising the error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions