Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I'm using Blather to build a tool that runs periodically, which means it starts up, runs some XMPP commands, and then exits.
This means that my IDs are basically always blather0001, which also means my sessionIDs are basically always the same, which is confusing to the remote side who doesn't know I've restarted and just sees sessionIDs it already knows about, some of which may be ongoing if the script exited in error.
I've tried to make this as minimal of a change as possible because I don't know what lead us to making this choice in the first-place. So there's still just a simple counter, but it's just that the counter is put on the end of a different static string for each run of the script.
I chose 8 hex pairs somewhat arbitrarily because it felt like a round number that was big enough that the liklihood of getting duplicates was vanishingly small, but 4 would have been a more similar length to "blather" which we had before. As it stands, with 8 pairs, the total length of the ID is 20 characters long (4 character counter), which I figure is probably fine.