This PR contains a posible fix for #30. Prior, we sometimes assumed users, producers or consumers existed. However, users could disconnect at any time.
To test this I used an extension refresh the page every second, and ran this for several minutes. This crashes pretty quickly prior to this PR, but with this changes it remains stable. We can't be sure it fixes #30 though, for the lack of a proper stacktrace.
This PR contains a posible fix for #30. Prior, we sometimes assumed users, producers or consumers existed. However, users could disconnect at any time.
To test this I used an extension refresh the page every second, and ran this for several minutes. This crashes pretty quickly prior to this PR, but with this changes it remains stable. We can't be sure it fixes #30 though, for the lack of a proper stacktrace.