Skip to content

streams: apply so_linger, so_rcvbuf and so_sndbuf to unix sockets - #23584

Open
devnexen wants to merge 2 commits into
php:masterfrom
devnexen:stream_unix_sockopts
Open

streams: apply so_linger, so_rcvbuf and so_sndbuf to unix sockets#23584
devnexen wants to merge 2 commits into
php:masterfrom
devnexen:stream_unix_sockopts

Conversation

@devnexen

@devnexen devnexen commented Sep 5, 2026

Copy link
Copy Markdown
Member

The unix and udg transports returned from the AF_UNIX branch before any socket context option was read. The parsing happens before the transport split now and the values are applied through the new php_network_apply_sockvals().

The unix and udg transports returned from the AF_UNIX branch before any socket
context option was read. The parsing happens before the transport split now and
the values are applied through the new php_network_apply_sockvals().

@bukka bukka left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks mostly good. Just not sure about so_linger change.

Comment thread main/streams/xp_socket.c Outdated
}

#ifdef SO_LINGER
if ((PHP_STREAM_XPORT_IS_TCP(stream) || PHP_STREAM_XPORT_IS_UNIX_ST(stream))

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is so_linger enabled for unix socket? AFAIK it has no effect there.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, you are right that was a mistake..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants