/* Check for avalaible space. */
len = buffer_total_space(s->req.buf);
if (len <= 0) {
- if (!notification_new(&hlua->com, &appctx->ctx.hlua_cosocket.wake_on_write, hlua->task)) {
- xref_unlock(&socket->xref, peer);
- WILL_LJMP(luaL_error(L, "out of memory"));
- }
goto hlua_socket_write_yield_return;
}
}
hlua_socket_write_yield_return:
+ if (!notification_new(&hlua->com, &appctx->ctx.hlua_cosocket.wake_on_write, hlua->task)) {
+ xref_unlock(&socket->xref, peer);
+ WILL_LJMP(luaL_error(L, "out of memory"));
+ }
xref_unlock(&socket->xref, peer);
WILL_LJMP(hlua_yieldk(L, 0, 0, hlua_socket_write_yield, TICK_ETERNITY, 0));
return 0;