-
Notifications
You must be signed in to change notification settings - Fork 31
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What has been changed is clear to me. Let's wait for @talwai review and then we can merge and ship the new release. Thanks a lot!
elog.Error(1, fmt.Sprintf("unexpected control request #%d", c)) | ||
exit := make(chan struct{}) | ||
|
||
go func() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should not have any implication. Something we're missing @talwai?
111dd7b
to
475d0dc
Compare
close(exit) | ||
return | ||
default: | ||
elog.Error(1, fmt.Sprintf("unexpected control request #%d", c)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What could these other command be? Are they all actual errors?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are not error indeed, only signals that we don't handle. I'll add your comment in the bigger PR about making the trace-agent work properly as a Windows Service.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Go ahead and merge back to my branch. I tested on windows, and it starts/stops successfully.
This PR extracts the logic of providing an exit channel out of the
runAgent
function, that way we can have different exit conditions: