Skip to content

Commit 7ee9cdb

Browse files
committed
dummy session is 1
1 parent a3eccf5 commit 7ee9cdb

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

service-src/service_gate.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -171,18 +171,18 @@ _forward(struct gate *g, struct connection * c, int size) {
171171
if (g->broker) {
172172
void * temp = skynet_malloc(size);
173173
databuffer_read(&c->buffer,&g->mp,temp, size);
174-
skynet_send(ctx, 0, g->broker, g->client_tag | PTYPE_TAG_DONTCOPY, 0, temp, size);
174+
skynet_send(ctx, 0, g->broker, g->client_tag | PTYPE_TAG_DONTCOPY, 1, temp, size);
175175
return;
176176
}
177177
if (c->agent) {
178178
void * temp = skynet_malloc(size);
179179
databuffer_read(&c->buffer,&g->mp,temp, size);
180-
skynet_send(ctx, c->client, c->agent, g->client_tag | PTYPE_TAG_DONTCOPY, 0 , temp, size);
180+
skynet_send(ctx, c->client, c->agent, g->client_tag | PTYPE_TAG_DONTCOPY, 1 , temp, size);
181181
} else if (g->watchdog) {
182182
char * tmp = skynet_malloc(size + 32);
183183
int n = snprintf(tmp,32,"%d data ",c->id);
184184
databuffer_read(&c->buffer,&g->mp,tmp+n,size);
185-
skynet_send(ctx, 0, g->watchdog, PTYPE_TEXT | PTYPE_TAG_DONTCOPY, 0, tmp, size + n);
185+
skynet_send(ctx, 0, g->watchdog, PTYPE_TEXT | PTYPE_TAG_DONTCOPY, 1, tmp, size + n);
186186
}
187187
}
188188

service/gate.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ function handler.message(fd, msg, sz)
2222
local c = connection[fd]
2323
local agent = c.agent
2424
if agent then
25-
skynet.redirect(agent, c.client, "client", 0, msg, sz)
25+
skynet.redirect(agent, c.client, "client", 1, msg, sz)
2626
else
2727
skynet.send(watchdog, "lua", "socket", "data", fd, netpack.tostring(msg, sz))
2828
end

0 commit comments

Comments
 (0)