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

Mitigate nil addition in EGP.umsg.End #2934

Merged
merged 2 commits into from
Dec 14, 2023
Merged

Conversation

Denneisk
Copy link
Member

@Denneisk Denneisk commented Dec 8, 2023

Was sitting on this but thought it was just a fluke.
I don't know the cause, EGP's net messages seem to be properly contained as best as I can tell.

@thegrb93
Copy link
Contributor

thegrb93 commented Dec 9, 2023

Shouldn't the net.Broadcast() be with the EGP.IntervalCheck[CurSender].bytes = EGP.IntervalCheck[CurSender].bytes + bytes? Also I don't see the point of changing CurSender to use NULL. Whatever is setting CurSender should do a IsValid check.

@Denneisk
Copy link
Member Author

Denneisk commented Dec 9, 2023

Shouldn't the net.Broadcast() be with the EGP.IntervalCheck[CurSender].bytes = EGP.IntervalCheck[CurSender].bytes + bytes?

It's needed to close the message if the sender becomes invalid somehow in between. It does nothing if a message isn't started. But I could change it to possibly be a bit less wasteful.

Whatever is setting CurSender should do a IsValid check.

It's to avoid nil checking and instead expect it always as an entity. IsValid is already done on sender before the message gets started.

@thegrb93
Copy link
Contributor

thegrb93 commented Dec 11, 2023

Will the IsValid check cause the EGP to stop working if the owner isn't connected?
Or do things already break if that happens?

@Denneisk
Copy link
Member Author

Will the IsValid check cause the EGP to stop working if the owner isn't connected? Or do things already break if that happens?

Yes, but it already would do that before.

@thegrb93 thegrb93 merged commit 8097737 into wiremod:master Dec 14, 2023
1 check failed
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.

2 participants