Skip to content

Conversation

@icewind1991
Copy link
Member

  • Prevent PHP request to get killed when using fclose callback
  • Add ignore_user_abort everywhere where the time limit is set to 0

From owncloud/core#26775

For #1166

@icewind1991 icewind1991 added the 3. to review Waiting for reviews label Jan 19, 2017
@icewind1991 icewind1991 added this to the Nextcloud 12.0 milestone Jan 19, 2017
Copy link
Member

@MorrisJobke MorrisJobke left a comment

Choose a reason for hiding this comment

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

Tested together with #3160

if ($this->lockingEnabled && $operation === 'fopen' && is_resource($result)) {
$unlockLater = true;
// make sure our unlocking callback will still be called if connection is aborted
ignore_user_abort(true);
Copy link
Member

Choose a reason for hiding this comment

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

undo this later on?

Copy link
Member Author

Choose a reason for hiding this comment

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

Don't think there is a reliable way to do that, since multiple streams can be opened at the same time and there is no clean way to tell when all of them are closed

@blizzz
Copy link
Member

blizzz commented Jan 23, 2017

commit signoff missing

* Prevent PHP request to get killed when using fclose callback

* Add ignore_user_abort everywhere where the time limit is set to 0

Signed-off-by: Robin Appelman <[email protected]>
@MorrisJobke MorrisJobke merged commit 9b0c6c0 into master Jan 23, 2017
@MorrisJobke MorrisJobke deleted the fcloseafterkill branch January 23, 2017 19:51
@MorrisJobke
Copy link
Member

@karlitschek Backport for #1166?

@karlitschek
Copy link
Member

please backport

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

Labels

3. to review Waiting for reviews

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants