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

response.SetError(...) returns "panic: Message can't be modified" #25

Open
tleyden opened this issue Feb 19, 2018 · 3 comments
Open

response.SetError(...) returns "panic: Message can't be modified" #25

tleyden opened this issue Feb 19, 2018 · 3 comments
Assignees
Labels
Milestone

Comments

@tleyden
Copy link
Contributor

tleyden commented Feb 19, 2018

As mentioned in #20 (comment), there is still some loose ends from #20 in terms of propagating the error back to the other side.

I'm spinning this off to a separate ticket since #20 was approved, and I think it's an incremental improvement over the existing situation.

@tleyden
Copy link
Contributor Author

tleyden commented Feb 19, 2018

@snej can you take a look at #20 (comment) and let me know?

@adamcfraser adamcfraser added this to the 2.1.0 milestone Feb 20, 2018
@tleyden
Copy link
Contributor Author

tleyden commented Feb 22, 2018

From @snej in the PR this was spun out of:

It doesn't affect the peer (since the socket's already been closed). It's for the benefit of the code using go-blip, i.e. SG -- it fulfills the promise that the request it sent will get a response. This helps it clean up properly.

@snej
Copy link
Contributor

snej commented Feb 23, 2018

Any ideas on how to mark the response as having run into an error?

You can't do it from the outside because response messages are immutable in the API. You should probably add a new internal method to Message that tells it to become an error.

@djpongh djpongh assigned tleyden and unassigned snej Mar 28, 2018
@adamcfraser adamcfraser modified the milestones: 2.1.0, 2.2.0 Apr 2, 2018
@djpongh djpongh modified the milestones: 2.5.0, Iridium Sep 6, 2018
@djpongh djpongh modified the milestones: Iridium, Cobalt Nov 19, 2018
@djpongh djpongh modified the milestones: Cobalt, Mercury Dec 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants