Skip to content
This repository was archived by the owner on Jul 1, 2021. It is now read-only.

Commit 0a364da

Browse files
committed
- unify message/command format
- soft topic access deny
1 parent 1084f32 commit 0a364da

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

service.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ func (s *Service) handleCommands(ctx *ConnContext, f http.HandlerFunc, r *http.R
166166
return
167167
}
168168

169-
return
169+
continue
170170
}
171171

172172
if err := s.connPool.subscribe(ctx, topics...); err != nil {

service_test.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -273,8 +273,7 @@ func Test_Service_DenyJoin(t *testing.T) {
273273
err = conn.WriteMessage(websocket.TextMessage, []byte(`{"topic":"join", "payload":["topic"]}`))
274274
assert.NoError(t, err)
275275

276-
out := <-read
277-
assert.Error(t, out.(error))
276+
assert.Equal(t, `{"topic":"#join","payload":["topic"]}`, readStr(<-read))
278277
}
279278

280279
func Test_Service_DenyJoinServer(t *testing.T) {

0 commit comments

Comments
 (0)