From dba3e1562bfb3a0e08129c9b6cd5b3623572dddc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BA=91=E9=A3=8E?= Date: Wed, 28 Aug 2013 17:40:01 +0800 Subject: [PATCH] bugfix: socket.write return true when success --- lualib-src/lua-socket.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lualib-src/lua-socket.c b/lualib-src/lua-socket.c index 02c40637..72992e44 100644 --- a/lualib-src/lua-socket.c +++ b/lualib-src/lua-socket.c @@ -419,7 +419,7 @@ lsend(lua_State *L) { sz = (int)len; } int err = skynet_socket_send(ctx, id, buffer, sz); - lua_pushboolean(L, err); + lua_pushboolean(L, !err); return 1; }