app/assets/javascripts/seapig/seapig-client.js.coffee in seapig-rails-0.0.3 vs app/assets/javascripts/seapig/seapig-client.js.coffee in seapig-rails-0.0.4
- old
+ new
@@ -10,23 +10,23 @@
connect: () ->
@connected = false
- @socket = new WebSocket(@url,'SeaPig-0.0')
+ @socket = new WebSocket(@url)
@socket.onerror = (error) =>
console.log('Seapig socket error', error)
@socket.close()
@socket.onclose = () =>
- console.log('Seapig connection closed')
+ console.log('Seapig connection closed') if @options.debug
for object_id, object of @slave_objects
object.valid = false
setTimeout((=>@connect()), 2000)
@socket.onopen = () =>
- console.log('Seapig connection opened')
+ console.log('Seapig connection opened') if @options.debug
@connected = true
@socket.send(JSON.stringify(action: 'client-options-set', options: @options))
for object_id, object of @slave_objects
@socket.send(JSON.stringify(action: 'object-consumer-register', id: object_id, latest_known_version: object.version))
for object_id, object of @master_objects