Compare commits

..

No commits in common. "61000f5f698a9bdf6f5a5ea2c56f0d412fac55c3" and "b89e017ae480dda0ec7391dfa67465276a0e3748" have entirely different histories.

6 changed files with 12 additions and 26 deletions

View file

@ -46,9 +46,7 @@ endif
hook:
[ ! -d "$(CURDIR)/.git/hooks" ] || ln -sf "$(CURDIR)/scripts/pre-commit.hook" "$(CURDIR)/.git/hooks/pre-commit"
godeps: $(VENDORBIN)/godeps
$(VENDORBIN)/godeps:
godeps:
GOPATH=$(GOPATH) $(GO) get github.com/rogpeppe/godeps
easyjson: dependencies

View file

@ -81,9 +81,6 @@ var (
)
type ProxyServer struct {
// 64-bit members that are accessed atomically must be 64-bit aligned.
load int64
version string
country string
@ -91,6 +88,7 @@ type ProxyServer struct {
nats signaling.NatsClient
mcu signaling.Mcu
stopped uint32
load int64
shutdownChannel chan bool
shutdownScheduled uint32

View file

@ -37,13 +37,11 @@ const (
)
type ProxySession struct {
// 64-bit members that are accessed atomically must be 64-bit aligned.
proxy *ProxyServer
id string
sid uint64
lastUsed int64
proxy *ProxyServer
id string
sid uint64
clientLock sync.Mutex
client *ProxyClient
pendingMessages []*signaling.ProxyServerMessage

View file

@ -96,9 +96,6 @@ const (
)
type Hub struct {
// 64-bit members that are accessed atomically must be 64-bit aligned.
sid uint64
nats NatsClient
upgrader websocket.Upgrader
cookie *securecookie.SecureCookie
@ -116,6 +113,7 @@ type Hub struct {
mu sync.RWMutex
ru sync.RWMutex
sid uint64
clients map[uint64]*Client
sessions map[uint64]Session
rooms map[string]*Room

View file

@ -136,9 +136,6 @@ type clientInterface interface {
}
type mcuJanus struct {
// 64-bit members that are accessed atomically must be 64-bit aligned.
clientId uint64
url string
mu sync.Mutex
nats NatsClient
@ -153,6 +150,7 @@ type mcuJanus struct {
closeChan chan bool
clientId uint64
muClients sync.Mutex
clients map[clientInterface]bool

View file

@ -259,11 +259,6 @@ func (s *mcuProxySubscriber) ProcessEvent(msg *EventProxyServerMessage) {
}
type mcuProxyConnection struct {
// 64-bit members that are accessed atomically must be 64-bit aligned.
reconnectInterval int64
msgId int64
load int64
proxy *mcuProxy
rawUrl string
url *url.URL
@ -275,12 +270,15 @@ type mcuProxyConnection struct {
conn *websocket.Conn
connectedSince time.Time
reconnectInterval int64
reconnectTimer *time.Timer
shutdownScheduled uint32
closeScheduled uint32
msgId int64
helloMsgId string
sessionId string
load int64
country atomic.Value
callbacks map[string]func(*ProxyServerMessage)
@ -961,10 +959,6 @@ func (c *mcuProxyConnection) newSubscriber(ctx context.Context, listener McuList
}
type mcuProxy struct {
// 64-bit members that are accessed atomically must be 64-bit aligned.
connRequests int64
nextSort int64
tokenId string
tokenKey *rsa.PrivateKey
@ -978,6 +972,8 @@ type mcuProxy struct {
connections []*mcuProxyConnection
connectionsMap map[string]*mcuProxyConnection
connectionsMu sync.RWMutex
connRequests int64
nextSort int64
proxyTimeout time.Duration
mu sync.RWMutex