Skip to content

Improper socket handling #4

@zhukovdm

Description

@zhukovdm

cchat/src/entity.hpp

Lines 51 to 54 in 8f90d12

virtual ~Entity()
{
if (sock_.has_value()) { close(*sock_); }
}

There is a chance the socket could be closed before all data are send/received. First shutdown socket, then close.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions