Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix fast connection closing #42

Merged
merged 4 commits into from
Jan 23, 2024
Merged

Fix fast connection closing #42

merged 4 commits into from
Jan 23, 2024

Conversation

roxblnfk
Copy link
Member

@roxblnfk roxblnfk commented Jan 23, 2024

What was changed

Added a constant delay of 100ms before an instant disconnect.
Run command now consumes signals
Added Cancellable and Destroyable interfaces

Why?

In some cases, the connection to the client closes too quickly. The client doesn't have time to receive all the content.

This problem could have been solved by removing this fragment:

/** @link https://github.com/buggregator/trap/pull/14 */
\socket_set_option($this->socket, \SOL_SOCKET, \SO_LINGER, ['l_linger' => 0, 'l_onoff' => 1]);

but the convenience of restarting the server is still important.

@roxblnfk roxblnfk merged commit 62763e1 into master Jan 23, 2024
18 checks passed
@roxblnfk roxblnfk deleted the fix-fast-connection-closing branch January 23, 2024 11:02
@roxblnfk roxblnfk added this to the 1.3.x milestone Jan 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant