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

Fix #30: Close channel on the client as soon as close event is registered #34

Merged
merged 1 commit into from
Feb 19, 2016
Merged

Fix #30: Close channel on the client as soon as close event is registered #34

merged 1 commit into from
Feb 19, 2016

Conversation

xPaw
Copy link
Member

@xPaw xPaw commented Feb 14, 2016

This is my proposed fix to the issue, unsure if there is a better way of doing it.

@maxpoulin64
Copy link
Member

Seems reasonable to me. In theory IRC is over TCP, and in theory servers should let you part channels so that seems fine. I think most (all?l clients just close the tab immediately and leave the part as a background job, dropping messages (the user doesn't want it, right?). The existance of the channel is checked, so if the server is stubborn the channel will just reopen as a query.

@astorije astorije self-assigned this Feb 14, 2016
@xPaw xPaw added the Type: Bug Issues that report and PRs that solve any defects that cause unexpected behaviors. label Feb 14, 2016
@astorije
Copy link
Member

@xPaw, tested locally and I can indeed "close" (aka remove from the list) the channel, but still receives a red "You're not on that channel" on the server window. Any way we can avoid that easily?

@maxpoulin64
Copy link
Member

I don't think so. It looks like a generic server error message, likely triggered by the extra part command.

Maybe we could add state tracking to chan.js instead to avoid leaving a channel twice?

@astorije
Copy link
Member

Ping @xPaw? :-)

@xPaw
Copy link
Member Author

xPaw commented Feb 18, 2016

@astorije, @maxpoulin64 is right. You will get an error for trying to leave a channel you're not in, but that's about it. Adding state tracking for channels would require quite a bit more code.

@astorije
Copy link
Member

You will get an error for trying to leave a channel you're not in, but that's about it.

OK then, seems good enough to me.

Adding state tracking for channels would require quite a bit more code.

Clearly out of scope for this PR and definitely needs some discussion/design before jumping into coding that, so good enough for me. At least this fixes the original bug without adding a new one :-)

👍 and merging as-is, no second review needed per the review process as @xPaw is a reviewer himself, the PR is minor and it's simply a bug fix.

astorije added a commit that referenced this pull request Feb 19, 2016
Fix #30: Close channel on the client as soon as close event is registered
@astorije astorije merged commit 172c8d5 into thelounge:master Feb 19, 2016
@xPaw xPaw deleted the fix-closing-channel branch March 7, 2016 17:17
@astorije astorije added this to the 1.1.0 milestone Apr 1, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issues that report and PRs that solve any defects that cause unexpected behaviors.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants