161 Commits

Author SHA1 Message Date
云风
406f3a7437 Lua 5.5.0 Release (#2119)
* Lua 5.5 beta

* lua 5.5.0 release
2025-12-23 10:19:09 +08:00
Zwlin
b02d619dd8 fix comment: check start time (#2038) 2025-06-15 20:59:01 +08:00
云华
94450ff00f fixed: service_gate_c half close (#2047) 2025-05-14 13:15:26 +08:00
King
c226ea3f1f 修复打开DEBUG_LOG时,编译错误 (#1922) 2024-06-24 07:21:49 +08:00
华仔
fb97668f9e fix word err (#1847) 2024-01-03 20:05:28 +08:00
Cloud Wu
8b55660274 Update lua 5.4.6 rc1 2023-05-08 19:08:11 +08:00
Cloud Wu
499610965a Update lua 2022-11-16 10:28:38 +08:00
Cloud Wu
800a3376d6 Revert "Update the return values of socket.listen, also return the real port bind to zero (#1638)"
This reverts commit c1eeba215d.
2022-09-03 22:03:11 +08:00
zaxbbun
c1eeba215d Update the return values of socket.listen, also return the real port bind to zero (#1638) 2022-09-03 07:19:03 +08:00
Cloud Wu
d1ce950dc1 Fix #1552 2022-03-19 07:10:52 +08:00
Cloud Wu
27866518ef Fix #1506 2021-11-19 08:48:27 +08:00
coder
0207b9210a Update service_logger.c (#1451)
格式化时间改为通用的结构,修复windows上时间显示不正确问题
2021-08-05 16:36:49 +08:00
Cloud Wu
8e45679d3d bugfix : coroutine.wrap for snlua 2021-02-23 16:19:01 +08:00
Cloud Wu
e23ad8fc6b fix type 2021-02-03 16:04:01 +08:00
Cloud Wu
bc2fba560f CAS expected should not be _Atomic type, #1317 2021-01-11 17:10:26 +08:00
Cloud Wu
1ed4fdf94d Use _Atomic type for socket.sending and socket.udpconnecting. See #1317 2021-01-11 16:57:25 +08:00
云风
b164e3a8a9 use stdatomic (#1317) 2021-01-11 10:54:34 +08:00
coder
284df5430b service_logger.c localtime崩溃,换成线程安全的localtime_r (#1311) 2020-12-28 15:42:16 +08:00
Cloud Wu
80b60f23c9 use CAS to finish set 2020-10-23 19:20:31 +08:00
Cloud Wu
a6adc69090 Use atomic instruct to avoid concurrence signal 0 2020-10-23 18:21:16 +08:00
云风
eaa60ca8dd Update to lua 5.4 (#1174)
* update to lua 5.4.0-rc1

* remove LUA_ERRGCMM

* use age bits for shared

* remove unused lbitlib.c

* use luaV_fastget

* fix #1174

* suspend函数tailcall优化

* 防止没有session导致未调用suspend

* luaH_setint check shared (#1184)

* set LUA_GCGEN by default

* fix #1174 (#1186)

checkshared in sweeplist

* update to lua 5.4 rc2

* update to lua 5.4 rc4

* move skynet.profile into snlua

* Use lua_sethook to interrupt tight loops

* remove lua_checksig

* critical condition for signals

* update to lua 5.4 released

* lua 5.4 bugfix

* update lua bugfix

* fix lua_sharestring (#1224)

* update lua

* update lua 5.4

* update README

* add skynet.select

* add test

* test error & discard

* yield session

* request error has no error message

* add timeout to skynet.select

* bugfix

* for lua 5.4

* new version

* bugfix

* bugfix

* use if instead of while

* make local

* yield in select for

* update lua 5.4.1

* change lua version (#1245)

Co-authored-by: xiaojin <xiaojin@onemt.com.cn>

* update lua version number

Co-authored-by: hong <hongling0@gmail.com>
Co-authored-by: hong <hongling-0@qq.com>
Co-authored-by: 风---自由 <996442717qqcom@gmail.com>
Co-authored-by: xiaojin <xiaojin@onemt.com.cn>
2020-10-10 13:36:59 +08:00
Cloud Wu
ce52533c74 remove time() 2020-08-11 16:32:22 +08:00
Cloud Wu
3025e4765a csec 2020-08-11 11:50:45 +08:00
Cloud Wu
446dafdc0b use skynet_now for timestamp 2020-08-11 11:47:33 +08:00
Cloud Wu
c7386fe768 open log file in append mode 2020-08-11 10:54:40 +08:00
Cloud Wu
d80ed7483d add timestamp for logging to file 2020-08-11 10:32:46 +08:00
Cloud Wu
9d7ea09789 Add socket_sendbuffer 2019-11-14 10:49:25 +08:00
Cloud Wu
8a3a0c1b71 register logger name in framework, see #909 2018-10-21 13:21:51 +08:00
caijietao
6c7cb5313d set backlog to 128 2018-05-22 13:08:00 +08:00
spin6lock
188e38198a add ipv6 host support to service_gate.c
service_gate的地址解析用strchr找到第一个':',并将后续的字符串作为
端口号解析。填ipv6地址"0:0:0:0:0:0:0:0:9999"的时候会出错,现在改成
strrchr,从右面找到的第一个':'
2018-05-22 13:07:02 +08:00
Cloud Wu
2bfba716ef forward fd to agent 2018-04-18 19:29:41 +08:00
Cloud Wu
9cf4525a8f avoid error circulation 2018-02-12 18:07:16 +08:00
Cloud Wu
0846a6533d fix a legacy problem. make harbor service more stable 2018-02-12 18:07:16 +08:00
云风
fad154f474 remove this free would be better 2017-08-24 10:01:47 +08:00
hwangcc23
40543d42d5 Fix double free
In the mainloop function, calling __skynet_free__ frees the pointer which may has already been freed in __push_socket_data__.

mainloop(struct skynet_context * context, void * ud, int type, int session, uint32_t source, const void * msg, size_t sz) {
        struct harbor * h = ud;
        switch (type) {
        case PTYPE_SOCKET: {
                const struct skynet_socket_message * message = msg;
                switch(message->type) {
                case SKYNET_SOCKET_TYPE_DATA:
                        push_socket_data(h, message);
                        skynet_free(message->buffer);
                        // skip...

To fix this potential double-free bug, clear the pointer message->buffer in __push_socket_data__ after the pointer is freed.
2017-08-23 23:43:20 +08:00
Cloud Wu
7ee9cdb29b dummy session is 1 2016-12-02 21:23:12 +08:00
Cloud Wu
ea9bc53261 reopen log file when recv signal HUP 2016-06-12 13:40:23 +08:00
Cloud Wu
a5c79cc4bd move skynet.memlimit from skynet.manager to skynet 2016-05-07 09:23:01 +08:00
Cloud Wu
4b96ade660 support sandbox memory limit 2016-05-06 23:40:44 +08:00
Cloud Wu
76d1e6fa1f memory warning 2016-05-06 20:37:51 +08:00
Cloud Wu
1da92850a0 bugfix: dispatch local global message queue 2016-01-19 17:14:52 +08:00
Cloud Wu
9747cf9aee don't assert here 2016-01-19 16:16:18 +08:00
Cloud Wu
878110f9f7 add codecache.mode() 2015-10-12 12:29:19 +08:00
xjdrew
515326dadc bugfix: remove Wformat warning 2015-10-10 18:39:42 +08:00
xjdrew
8dd9923cf6 gate: application could control when to start receiving data 2015-10-08 16:55:29 +08:00
xjdrew
97ff6afc84 removte unused code 2015-09-29 17:29:33 +08:00
great90
63942496fd 从check_wsz发送的SKYNET_SOCKET_TYPE_WARNING消息会assert失败,导致coredump 2015-09-21 23:50:18 +08:00
Cloud Wu
752a501f68 bugfix: remove DONTCOPY tag from type 2015-09-21 10:40:09 +08:00
Cloud Wu
010d1c1d4f avoid dead loop 2015-08-24 11:50:40 +08:00
Cloud Wu
947727e33a add new socket message WARNING 2015-08-11 13:21:24 +08:00