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

Commit8e33fc1

Browse files
committed
Call getsockopt() on the correct socket.
We're interested in the buffer size of the socket that's connected to theclient, not the one that's listening for new connections. It happened towork, as default buffer size is the same on both, but it was clearly notwrong.Spotted by Tom Lane
1 parent4f33621 commit8e33fc1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎src/backend/libpq/pqcomm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -773,7 +773,7 @@ StreamConnection(pgsocket server_fd, Port *port)
773773
* https://msdn.microsoft.com/en-us/library/bb736549%28v=vs.85%29.aspx
774774
*/
775775
optlen=sizeof(oldopt);
776-
if (getsockopt(server_fd,SOL_SOCKET,SO_SNDBUF, (char*)&oldopt,
776+
if (getsockopt(port->sock,SOL_SOCKET,SO_SNDBUF, (char*)&oldopt,
777777
&optlen)<0)
778778
{
779779
elog(LOG,"getsockopt(SO_SNDBUF) failed: %m");

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp