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

fix: improve wake & sleep handling#74

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
ethanndickson merged 3 commits intomainfromethan/improve-sleep
Feb 24, 2025
Merged

Conversation

ethanndickson
Copy link
Member

No description provided.

@ethanndicksonGraphite App
Copy link
MemberAuthor

This stack of pull requests is managed byGraphite. Learn more aboutstacking.

}

overridefunc wake(){
guard !reassertingelse{return}
Copy link
MemberAuthor

Choose a reason for hiding this comment

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

macOS does indeedwake a bunch during sleep to check the network. For us dogfooding, this means it might attempt to download a new dylib while the device sleeps, which the user won't be able to approve. In that case it'll get stuck inreasserting, in this case (and in any case, really) we don't want to try and start it up a second time.

Copy link
Member

Choose a reason for hiding this comment

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

Got it. Would you also mind adding that as a code comment?

ethanndickson reacted with thumbs up emoji
Comment on lines 125 to 129
globalXPCListenerDelegate.vpnXPCInterface.manager=nil
self.manager=nil
completionHandler()
}
self.manager=nil
}
Copy link
MemberAuthor

Choose a reason for hiding this comment

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

We wantself.manager being nil to be our code's perspective as to whether a stop operation has actually finished. Before, it was nil a little too early, though I don't think it was causing any issues.

Copy link
Member

Choose a reason for hiding this comment

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

Would you mind adding that as a code comment?

ethanndickson reacted with thumbs up emoji
Comment on lines +146 to +149
guard manager==nilelse{
logger.error("wake called with non-nil Manager")
return
}
Copy link
MemberAuthor

Choose a reason for hiding this comment

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

This was previously in thestart function called right after, but we should avoid resetting the network settings needlessly if we can.

ethanndickson reacted with thumbs up emoji
@ethanndicksonethanndickson marked this pull request as ready for reviewFebruary 21, 2025 01:30
Copy link
Member

@ThomasK33ThomasK33 left a comment

Choose a reason for hiding this comment

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

LGTM, small remarks about getting some comments in.

@ethanndicksonethanndickson merged commitf970cfc intomainFeb 24, 2025
4 checks passed
@ThomasK33ThomasK33 deleted the ethan/improve-sleep branchFebruary 25, 2025 13:44
@ethanndicksonethanndickson self-assigned thisMay 23, 2025
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@ThomasK33ThomasK33ThomasK33 approved these changes

Assignees

@ethanndicksonethanndickson

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@ethanndickson@ThomasK33

[8]ページ先頭

©2009-2025 Movatter.jp