Skip to content

disconnect event has no peer data #270

@winsvega

Description

@winsvega

Apparently when using

while (enet_host_service(m_server, &event, 0) > 0)
{
        switch (event.type)
        {
              case ENET_EVENT_TYPE_DISCONNECT:
        }
}
``

an event comes with peer data removed. 
so event.peer->data   is 0
event.peer->connectionID is 0
all is nulled and I have no way to tell who has disconnected.

the workaround is to store a map of peer pointers in memory itself represented as int or str. 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions