From ec4ae985367a3de7fa7bfd1cfa289acf27068831 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BA=91=E9=A3=8E?= Date: Tue, 8 Oct 2013 10:26:25 +0800 Subject: [PATCH] id reserve bugfix --- skynet-src/socket_server.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/skynet-src/socket_server.c b/skynet-src/socket_server.c index 411d92cc..b65b300a 100644 --- a/skynet-src/socket_server.c +++ b/skynet-src/socket_server.c @@ -123,7 +123,7 @@ reverve_id(struct socket_server *ss) { for (i=0;ialloc_id), 1); if (id < 0) { - id = __sync_fetch_and_and(&(ss->alloc_id), 0x7fffffff); + id = __sync_and_and_fetch(&(ss->alloc_id), 0x7fffffff); } struct socket *s = &ss->slot[id % MAX_SOCKET]; if (s->type == SOCKET_TYPE_INVALID) {