After "haitetra"
https://github.com/warmcat/libwebsockets/issues/343
Signed-off-by: Andy Green <andy.green@linaro.org>
DWORD ev;
WSANETWORKEVENTS networkevents;
struct libwebsocket_pollfd *pfd;
+ struct libwebsocket *wsi;
/* stay dead once we are dead */
continue;
if (pfd->events & LWS_POLLOUT) {
- if (wsi_from_fd(context,pfd->fd)->sock_send_blocking)
+ wsi = wsi_from_fd(context, pfd->fd);
+ if (!wsi || wsi->sock_send_blocking)
continue;
pfd->revents = LWS_POLLOUT;
n = libwebsocket_service_fd(context, pfd);