Skip to content

Commit

Permalink
close() не является обязательным, так что... ладно. давай просто сдел…
Browse files Browse the repository at this point in the history
…аем вот так

Signed-off-by: Yonle <yonle@lecturify.net>
  • Loading branch information
Yonle committed Jun 23, 2024
1 parent b3b00cc commit 459a5f5
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions bouncer.go
Original file line number Diff line number Diff line change
Expand Up @@ -215,10 +215,6 @@ func (s *Session) CountEvents(subid string) int {
*/

func (s *Session) WriteJSON(data *[]interface{}) {
if s.destroyed {
return
}

JsonData, _ := json.Marshal(*data)

s.UpstreamMessage <- &JsonData
Expand All @@ -240,8 +236,6 @@ func (s *Session) OpenSubscriptions(conn *websocket.Conn) {
}

func (s *Session) Destroy(_ int, _ string) error {
close(s.UpstreamMessage)

s.destroyed = true

s.relaysMu.Lock()
Expand Down

0 comments on commit 459a5f5

Please sign in to comment.