title: ZeroRPC between nodejs and Python running only for the first time
body: <p>We are trying to call a python module from NodeJS using ZeroRPC. </p>
  
  <p>Nodejs Code:</p>
  
  <pre><code>app.get('/topList', function(req, res){
      var zerorpc = require("zerorpc");
      var client = new zerorpc.Client({ timeout: 3000, heartbeatInterval: 300000 });
      console.log('Here');
      client.connect("tcp://127.0.0.1:4212");
      console.log('And Here');
      client.invoke("toplist", '2015-02-13T05:46:29.800Z', '2015-02-13T08:46:29.800Z', function(error, tlist, more) 
      {
          console.log('And Here also');
          if(error) {
              console.error(error);
          } 
          console.log(tlist);
          res.send(tlist);
          client.close();
      });
  });
  </code></pre>
  
  <p>Python code:</p>
  
  <pre><code>import zerorpc
  import logging
  import gevent
  logging.basicConfig()
  
  class HelloRPC(object):
     def toplist(self, fromtime, tilltime): 
         print 'Python Hello'
         # Doing some some manipulations and placing the result in the variable top_20
         return top_20
  
   p = HelloRPC()  
   s = zerorpc.Server(p)
   s.bind("tcp://127.0.0.1:4212")
   s.run()
  </code></pre>
  
  <p>First we ran the python code to up the server. Next we start the nodejs code. </p>
  
  <p>Now in the browser for the first time if we try for localhost:8080/topList, nodejs issues an request to python, then python program is running and returning the result to nodejs, then in the browser we are able to see the result. </p>
  
  <p>The problem comes if we try for the second time localhost:8080/topList, nodejs not able to invoke the python code. We didn't see 'Python Hello' in python console. </p>
  
  <p>We are not able to fix this scenario. It is only running for the first time, then nodejs not able to invoke python. Is the server is getting closed after runnig first time. </p>
  
  <p>We also tried to use While True or gevent like below. But still same issue. </p>
  
  <pre><code>While True:
      p = HelloRPC()  
      s = zerorpc.Server(p)
      s.bind("tcp://127.0.0.1:4212")
      s.run()
      #gevent.spawn(s.run)
  </code></pre>
  
  <p>Can anyone will provide some idea to fix this ?</p>