Skip to content

Commit

Permalink
Fix WR event bug
Browse files Browse the repository at this point in the history
  • Loading branch information
maximevince committed Jun 23, 2015
1 parent 26b5ca6 commit fe0f66a
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions pico_bsd_sockets.c
Original file line number Diff line number Diff line change
Expand Up @@ -441,6 +441,7 @@ int pico_sendto(int sd, void * buf, int len, int flags, struct sockaddr *_dst, s
port = bsd_to_pico_port(_dst, socklen);
retval = pico_socket_sendto(ep->s, ((uint8_t *)buf) + tot_len, len - tot_len, &picoaddr, port);
}
pico_event_clear(ep, PICO_SOCK_EV_WR);
pico_mutex_unlock(picoLock);

/* If sending failed, return an error */
Expand All @@ -452,9 +453,6 @@ int pico_sendto(int sd, void * buf, int len, int flags, struct sockaddr *_dst, s
return -1;
}

/* No, error so clear the revent */
//pico_event_clear(ep, PICO_SOCK_EV_WR);

if (retval > 0)
{
tot_len += retval;
Expand Down

0 comments on commit fe0f66a

Please sign in to comment.