diff --git a/service-src/service_gate.c b/service-src/service_gate.c index 71ab1a64..b8da7441 100644 --- a/service-src/service_gate.c +++ b/service-src/service_gate.c @@ -171,18 +171,18 @@ _forward(struct gate *g, struct connection * c, int size) { if (g->broker) { void * temp = skynet_malloc(size); databuffer_read(&c->buffer,&g->mp,temp, size); - skynet_send(ctx, 0, g->broker, g->client_tag | PTYPE_TAG_DONTCOPY, 0, temp, size); + skynet_send(ctx, 0, g->broker, g->client_tag | PTYPE_TAG_DONTCOPY, 1, temp, size); return; } if (c->agent) { void * temp = skynet_malloc(size); databuffer_read(&c->buffer,&g->mp,temp, size); - skynet_send(ctx, c->client, c->agent, g->client_tag | PTYPE_TAG_DONTCOPY, 0 , temp, size); + skynet_send(ctx, c->client, c->agent, g->client_tag | PTYPE_TAG_DONTCOPY, 1 , temp, size); } else if (g->watchdog) { char * tmp = skynet_malloc(size + 32); int n = snprintf(tmp,32,"%d data ",c->id); databuffer_read(&c->buffer,&g->mp,tmp+n,size); - skynet_send(ctx, 0, g->watchdog, PTYPE_TEXT | PTYPE_TAG_DONTCOPY, 0, tmp, size + n); + skynet_send(ctx, 0, g->watchdog, PTYPE_TEXT | PTYPE_TAG_DONTCOPY, 1, tmp, size + n); } } diff --git a/service/gate.lua b/service/gate.lua index 78fb099f..f61eed6e 100644 --- a/service/gate.lua +++ b/service/gate.lua @@ -22,7 +22,7 @@ function handler.message(fd, msg, sz) local c = connection[fd] local agent = c.agent if agent then - skynet.redirect(agent, c.client, "client", 0, msg, sz) + skynet.redirect(agent, c.client, "client", 1, msg, sz) else skynet.send(watchdog, "lua", "socket", "data", fd, netpack.tostring(msg, sz)) end