Fix minor races, add in 1.3 to testing, bump version

This commit is contained in:
Derek Collison
2014-07-24 08:03:04 -07:00
parent c0941c99a8
commit 13d256b8cc
4 changed files with 8 additions and 1 deletions

View File

@@ -1,6 +1,7 @@
language: go
go:
- 1.2
- 1.3
branches:
only:

View File

@@ -880,6 +880,8 @@ func (c *client) closeConnection() {
// Check for a solicited route. If it was, start up a reconnect unless
// we are already connected to the other end.
if c.isSolicitedRoute() {
srv.mu.Lock()
defer srv.mu.Unlock()
rid := c.route.remoteID
if rid != "" && srv.remotes[rid] != nil {
Debug("Not attempting reconnect for solicited route, already connected.", rid)

View File

@@ -8,7 +8,7 @@ import (
const (
// VERSION is the current version for the server.
VERSION = "0.5.2"
VERSION = "0.5.4"
// DEFAULT_PORT is the deault port for client connections.
DEFAULT_PORT = 4222

View File

@@ -157,7 +157,11 @@ func (s *Server) routeSidQueueSubscriber(rsid []byte) (*subscription, bool) {
return nil, false
}
cid := uint64(parseInt64(matches[RSID_CID_INDEX]))
s.mu.Lock()
client := s.clients[cid]
s.mu.Unlock()
if client == nil {
return nil, true
}