Browse Source

undo skip poll, socked isnt binding

blackjok3r
blackjok3r 6 years ago
parent
commit
2d522edb7d
  1. 8
      iguana/dpow/dpow_network.c

8
iguana/dpow/dpow_network.c

@ -2205,17 +2205,17 @@ void dpow_send(struct supernet_info *myinfo,struct dpow_info *dp,struct dpow_blo
memcpy(np->packet,data,datalen);
sentbytes = -1;
// deadlocks! portable_mutex_lock(&myinfo->dpowmutex);
maxiters = 2;
maxiters = 100;
for (i=0; i<maxiters; i++)
{
struct nn_pollfd pfd;
pfd.fd = myinfo->dpowsock;
pfd.events = NN_POLLOUT;
//if ( nn_poll(&pfd,1,10) > 0 )
//{
if ( nn_poll(&pfd,1,10) > 0 )
{
sentbytes = signed_nn_send(myinfo,myinfo->ctx,myinfo->persistent_priv,myinfo->dpowsock,np,size);
break;
//}
}
usleep(1000);
}
if ( i == maxiters )

Loading…
Cancel
Save