Skip to content

Commit

Permalink
a quick fix for cluster handling of slices of interfaces
Browse files Browse the repository at this point in the history
  • Loading branch information
or-else committed Sep 25, 2017
1 parent 4360229 commit 25ac06e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
5 changes: 4 additions & 1 deletion server/cluster.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package main

import (
"encoding/gob"
"encoding/json"
"errors"
"log"
Expand Down Expand Up @@ -178,7 +179,7 @@ type Cluster struct {
// dispatch the message to it like it came from a normal session.
// Called by a remote node.
func (Cluster) Master(msg *ClusterReq, unused *bool) error {
log.Printf("cluster: Master request received from %s node", msg.Node)
log.Printf("cluster: Master request received from node '%s'", msg.Node)

// Find the local session associated with the given remote session.
sess := globals.sessionStore.Get(msg.Sess.Sid)
Expand Down Expand Up @@ -321,6 +322,8 @@ func clusterInit(configString json.RawMessage) {
log.Fatal(err)
}

gob.Register([]interface{}{})

globals.cluster = &Cluster{
thisNodeName: config.ThisName,
ring: rh.New(CLUSTER_HASH_REPLICAS, nil),
Expand Down
3 changes: 0 additions & 3 deletions server/datamodel.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,6 @@ type MsgGetQuery struct {
Data *MsgBrowseOpts `json:"data,omitempty"`
}

// Free-form content from the client. Used in subscription management.
type SubInfo interface{}

// MsgSetSub: payload in set.sub request to update current subscription or invite another user, {sub.what} == "sub"
type MsgSetSub struct {
// User affected by this request. Default (empty): current user
Expand Down

0 comments on commit 25ac06e

Please sign in to comment.