 
   stop: ->
     if @started
-      @sock.close()
+      if @sock._zmq.state is 0
+        @sock.close()
+      super
 
   send: (message) ->
     @start() unless @started


  stop: ->
    if @started
      @sock.close()
      super

class LBSocketInboundAdapter extends InboundAdapter


  stop: ->
    if @started
      if @sock._zmq.state is 0
        @sock.close()
      super

  send: (message) ->
    @start() unless @started
