Jump to content

How to fix fdwatch-source?


Recommended Posts

  • Premium

Hi, I'm new on this community.

 

How can i fix this error: fdwatch : per null in event?

 

Can someone help me please?

 

I'm working on 40k

 

Thx!

 

EDIT:

 

i found this in ClientManager.cpp

 

int num_events = fdwatch(m_fdWatcher, 0);
int idx;
CPeer * peer;

for (idx = 0; idx < num_events; ++idx) // 인풋
{
peer = (CPeer *) fdwatch_get_client_data(m_fdWatcher, idx);

if (!peer)
{
if (fdwatch_check_event(m_fdWatcher, m_fdAccept, idx) == FDW_READ)
{
AddPeer(m_fdAccept);
fdwatch_clear_event(m_fdWatcher, m_fdAccept, idx);
}
else
{
sys_err("FDWATCH: peer null in event: ident %d", fdwatch_get_ident(m_fdWatcher, idx));
}

continue;
}

switch (fdwatch_check_event(m_fdWatcher, peer->GetFd(), idx))
{
case FDW_READ:
if (peer->Recv() < 0)
{
sys_err("Recv failed");
RemovePeer(peer);
}
else
{
if (peer == m_pkAuthPeer)
if (g_log)
sys_log(0, "AUTH_PEER_READ: size %d", peer->GetRecvLength());

ProcessPackets(peer);
}
break;

case FDW_WRITE:
if (peer == m_pkAuthPeer)
if (g_log)
sys_log(0, "AUTH_PEER_WRITE: size %d", peer->GetSendLength());

if (peer->Send() < 0)
{
sys_err("Send failed");
RemovePeer(peer);
}

break;

case FDW_EOF:
RemovePeer(peer);
break;

default:
sys_err("fdwatch_check_fd returned unknown result");
RemovePeer(peer);
break;
}
}

 

but i don't no how can i cancel this error.

Link to comment
Share on other sites

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

syslog & syserr helps a lot you know?

 

ps: this "sys_err("FDWATCH: peer null in event: ident %d", fdwatch_get_ident(m_fdWatcher, idx));" is retuned when something is wrong with your server, stoping that from showing won't stop the error to ocurr

pps: this error usually ocurrs when a query failed to read and/or write some data from/into an inexistent value

ppps: if can't write "FDW_WRITE" or read "FDW_READ" or is end of file "FDW_EOF" and no data is send or recived il will close that peer  "RemovePeer(peer);", and if there is no peer "if (!peer)" (and i asume you realise no peer = core down) it will return this error "FDWATCH: peer null in event: ident %d", fdwatch_get_ident(m_fdWatcher, idx));"

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.