Fixed app and connection tests.

The tests was not updated.
This commit is contained in:
claudemiro
2015-01-13 13:29:52 -03:00
parent 59457cc734
commit 0e3440bc35
3 changed files with 42 additions and 36 deletions
+3 -3
View File
@@ -164,18 +164,18 @@ func NewChannel(channelID string) *Channel {
}
// This function generate a sequencial ID
func newID() string {
func newID() (string, int) {
mutex.Lock()
defer mutex.Unlock()
currentID += 1
return strconv.Itoa(currentID)
return strconv.Itoa(currentID), currentID
}
// Create a new Subscriber
func NewSubscriber(socketID string, s *websocket.Conn) *Subscriber {
id := newID()
id, _ := newID()
log.Infof("Creating a new Subscriber %+v with id %s", socketID, id)