mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-25 12:43:09 +00:00
@@ -433,6 +433,7 @@ pack_dict(lua_State *L, struct bson *b, bool isarray) {
|
|||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
luaL_error(L, "Invalid key type : %s", lua_typename(L, kt));
|
luaL_error(L, "Invalid key type : %s", lua_typename(L, kt));
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
append_one(b, L, key, sz);
|
append_one(b, L, key, sz);
|
||||||
|
|||||||
@@ -328,7 +328,7 @@ send_buffer(struct socket_server *ss, struct socket *s, struct socket_message *r
|
|||||||
case EINTR:
|
case EINTR:
|
||||||
continue;
|
continue;
|
||||||
case EAGAIN:
|
case EAGAIN:
|
||||||
return 0;
|
return -1;
|
||||||
}
|
}
|
||||||
force_close(ss,s, result);
|
force_close(ss,s, result);
|
||||||
return SOCKET_CLOSE;
|
return SOCKET_CLOSE;
|
||||||
@@ -347,6 +347,11 @@ send_buffer(struct socket_server *ss, struct socket *s, struct socket_message *r
|
|||||||
s->tail = NULL;
|
s->tail = NULL;
|
||||||
sp_write(ss->event_fd, s->fd, s, false);
|
sp_write(ss->event_fd, s->fd, s, false);
|
||||||
|
|
||||||
|
if (s->type == SOCKET_TYPE_HALFCLOSE) {
|
||||||
|
force_close(ss, s, result);
|
||||||
|
return SOCKET_CLOSE;
|
||||||
|
}
|
||||||
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -575,6 +580,7 @@ forward_message(struct socket_server *ss, struct socket *s, struct socket_messag
|
|||||||
|
|
||||||
if (s->type == SOCKET_TYPE_HALFCLOSE) {
|
if (s->type == SOCKET_TYPE_HALFCLOSE) {
|
||||||
// discard recv data
|
// discard recv data
|
||||||
|
FREE(buffer);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user