Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit3bc578b

Browse files
committed
Update sockhub
1 parentc2f2769 commit3bc578b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

‎contrib/pg_xtm/sockhub/sockhub.c‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,6 @@ void ShubLoop(Shub* shub)
246246
ShubMessageHdr*hdr= (ShubMessageHdr*)(shub->out_buffer+pos);
247247
intchan=hdr->chan;
248248
n=pos+sizeof(ShubMessageHdr)+hdr->size <=shub->out_buffer_used ?hdr->size+sizeof(ShubMessageHdr) :shub->out_buffer_used-pos;
249-
pos+=sizeof(ShubMessageHdr);
250249
if (!write_socket(chan, (char*)hdr,n)) {
251250
shub->params->error_handler("Failed to write to local socket",SHUB_RECOVERABLE_ERROR);
252251
close_socket(shub,chan);
@@ -269,9 +268,11 @@ void ShubLoop(Shub* shub)
269268
}
270269
tail-=n;
271270
}while (tail!=0);
271+
272272
pos=shub->out_buffer_used;
273273
break;
274274
}
275+
pos+=n;
275276
}
276277
memcpy(shub->out_buffer,shub->out_buffer+pos,shub->out_buffer_used-pos);
277278
shub->out_buffer_used-=pos;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp