Skip to content

Commit

Permalink
fixing stream scoping issue when a user connects to two seperate streams
Browse files Browse the repository at this point in the history
  • Loading branch information
purehyperbole committed Jun 20, 2018
1 parent f73021e commit 44b369f
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 0 additions & 4 deletions Gopkg.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,3 @@
[[constraint]]
name = "github.com/r3labs/broadcast"
branch = "master"

[[constraint]]
name = "github.com/smartystreets/goconvey"
version = "1.6.3"
2 changes: 1 addition & 1 deletion handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ func register(w http.ResponseWriter, s *Session) (*broadcast.Subscriber, chan *b
bc.CreateStream(*s.Stream)
}

sub := bc.GetSubscriber(s.Username)
sub := bc.GetStreamSubscriber(*s.Stream, s.Username)
if sub == nil {
sub = broadcast.NewSubscriber(s.Username)
bc.Register(*s.Stream, sub)
Expand Down

0 comments on commit 44b369f

Please sign in to comment.