[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [Libevent-users] Event timeout after it has been freed



On Thu, Jun 26, 2014 at 11:18 AM, Robin <imer@xxxxxxx> wrote:
 [...]
> Code..
> You can find the Event timer thing here:
> https://github.com/imermcmaps/m2t/tree/master/Server/shared/util
> Basic Socket class:
> https://github.com/imermcmaps/m2t/blob/master/Server/shared/net/Socket.cpp
> The ping event is created here:
> https://github.com/imermcmaps/m2t/blob/master/Server/game/net/socket/Client.cpp#L141
> The codebase is still a bit messy, you should find everything related to the
> network in either shared/net/ or game/net/
>

This is an odd thought -- but I believe it's possible for
Socket::OnEvent to get called with both BEV_EVENT_EOF and
BEV_EVENT_ERROR .  If that happens, your code will call
Socket::OnDisconnect twice, creating _two_ timer events for a
reconnect.  Could that be going on here?

-- 
Nick
***********************************************************************
To unsubscribe, send an e-mail to majordomo@xxxxxxxxxxxxx with
unsubscribe libevent-users    in the body.