From d3771edc9d5a878c34de954cc845d7096a4bcc1d Mon Sep 17 00:00:00 2001 From: Cloud Wu Date: Tue, 11 Aug 2015 14:04:15 +0800 Subject: [PATCH] The cluster message never great than 64K now --- lualib-src/lua-cluster.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lualib-src/lua-cluster.c b/lualib-src/lua-cluster.c index 40cc453e..4afe0e6d 100644 --- a/lualib-src/lua-cluster.c +++ b/lualib-src/lua-cluster.c @@ -1,6 +1,7 @@ #include #include #include +#include #include "skynet.h" @@ -28,10 +29,7 @@ fill_uint32(uint8_t * buf, uint32_t n) { static void fill_header(lua_State *L, uint8_t *buf, int sz, void *msg) { - if (sz >= 0x10000) { - skynet_free(msg); - luaL_error(L, "request message is too long %d", sz); - } + assert(sz < 0x10000); buf[0] = (sz >> 8) & 0xff; buf[1] = sz & 0xff; }