You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I fixed that by converting the map to sync.Map. Although, it required a little bit of an ugly solution as sync.Map doesn't support types. It's a map of interface{} which you have to dynamically check outside compile time if they're the right type. You can find the solution here
It actually solved a data-race problem of mine which crashed the entire frontend which was supported by the golang graphql server, which is nice.
But I think it's an ugly solution to serve to the public so I wont make a PR unless someone thinks it's alright. From what I see this repository's maintainers are inactive anyways so a PR probably wouldn't serve anyone :P
But whoever wants to utilize this solution into their code they're free to do so. :)
Error happens in
https://github.com/functionalfoundry/graphqlws/blob/master/subscriptions.go#L157
Seems like the subscription manager map is not concurrent safe.
The text was updated successfully, but these errors were encountered: