title: ZeroMQ push socket causes client to not terminate when no process is listening
body: <p>I'm just starting to mess with ZeroMQ and I have a problem with a client that doesn't terminate normally.  In particular I have a client that may "push" data when no sink server is listening and that seems to make the process hang after the python code has finished.  I assume there is some background thread that needs to be cleaned up -- please tell me how or point to documentation.</p>
  
  <p>Here is the relevant piece of code.  If I run the process with no listener with the "self.push" line uncommented the process hangs</p>
  
  <pre class="lang-python prettyprint-override"><code>def setup(self):
      print self.name, "connect to sockets"
      ctx = self.ctx = zmq.Context()
      self.pull = ctx.socket(zmq.PULL)
      self.pull.connect(self.ventillatorAddress)
      self.push = ctx.socket(zmq.PUSH)
      self.push.connect(self.sinkAddress)
      self.control = ctx.socket(zmq.SUB)
      self.control.connect(self.publisherAddress)
      self.control.setsockopt(zmq.SUBSCRIBE, "") # get every control message
      self.inbox = ctx.socket(zmq.SUB)
      self.inbox.connect(self.distributorAddress)
      self.inbox.setsockopt(zmq.SUBSCRIBE, self.name) # listen only for messages addressed with name
  def start(self):
      print self.name,  "push worker is ready signal"
      # listen for "go" signal
      pollcount = 0
      go = False
      while not go:
          #print "send ready for", self.name
          #self.push.send(self.name+" ready")
          print "listen for 'go'"
          msg = self.recvPoll(self.control)
          if msg is None:
              pollcount += 1
              assert pollcount&lt;10
              print "poll timeout", pollcount
              time.sleep(1)
              continue
          pollcount = 0
          print "recv'd", msg
          assert msg=="go!"
          go = True
      print "go signal received"
      pass
  </code></pre>
  
  <p>With the line commented (and no listener) the process completes normally.
  I tried context.term() and context.destroy() and they don't seem to help.</p>
  
  <p>How can I clean up the socket?  Or any other clues?  Thanks in advance!</p>