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

the method of kick has a conflict of writing concurrently #258

Open
lopies opened this issue Nov 4, 2021 · 6 comments
Open

the method of kick has a conflict of writing concurrently #258

lopies opened this issue Nov 4, 2021 · 6 comments

Comments

@lopies
Copy link

lopies commented Nov 4, 2021

another route write message with chan type,so the message response to client concurrent security,but the method of kick use basic connect to write to client, i can not use the method of kick to remove a person from room,it make a mistake about writing concurrent.

@lopies
Copy link
Author

lopies commented Nov 5, 2021

Session.Kick() ,method (s.entity.Kick(ctx)) ,click, implement by Agent.Kick(_, err = a.conn.Write(p)),it has a conflict

@lopies
Copy link
Author

lopies commented Nov 5, 2021

There is no solution to kicking people in the context of what he is sending a messagge if i am an administrator

@felipejfc
Copy link
Contributor

you mean you can't kick someone if you're processing a handler that the player initiated?

@lopies
Copy link
Author

lopies commented Nov 17, 2021

you mean you can't kick someone if you're processing a handler that the player initiated?

First ,websocket connections cannot be written concurrently, the files push. Go and Kick. go, i think push.go(package app) is correct ,it uses Channel for security to send message to someone,but kick.go(app.go) uses the lowest level connection to send kick packet to someone,This is conflicting

@lopies
Copy link
Author

lopies commented Nov 17, 2021

you mean you can't kick someone if you're processing a handler that the player initiated?

I think ,the kick packet should use the type of channel defined earlier,you want to send kick packet to someone,maybe you can send a kick packet to chan,so there's no conflict.

@lopies lopies closed this as completed Nov 17, 2021
@lopies lopies reopened this Nov 17, 2021
@Tiper-In-Github
Copy link
Contributor

I encountered the same problem

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

No branches or pull requests

3 participants