title: Can't upload two or more files using FTPClient node.js module
body: <p>I'm using node, and the node-ftp module. I need to upload two files to another server, I'm able to upload one file, but when I try uploading two files it throws back and error.</p>
  
  <p>according to their api, this is the code for sending a file</p>
  
  <pre><code>var fs = require('fs');
  conn.put(fs.createReadStream('/var/www/videoComplete/'+ videoID +'.flv'), '/home/wowza/content/'+ videoID +'.flv', function(e) {
    console.log(fileName + '.flv uploaded to Streaming Server :)');
    conn.end();
  });
  </code></pre>
  
  <p>which works fine, but if i want to do two file I assume I would have to just repeat that function, but it won't work. Does anyone know how to send two or more files using FTPClient</p>
  
  <p>here is the the code I'm trying to execute </p>
  
  <pre><code>conn = new FTPClient({ host: 'serverIP' });
  conn.on('connect', function() {
    conn.auth('user', 'pass', function(e) {
      if (e) throw e;
      var fs = require('fs');
  
      conn.put(fs.createReadStream('/var/www/ce-videoComplete/'+ videoID +'.flv'), '/home/wowza/content/'+ videoID +'.flv', function(e) {
        console.log(fileName + '.flv uploaded to Streaming Server :)');
        conn.end();
      });
  
      conn.put(fs.createReadStream('/var/www/ce-thumbnails/'+ videoID +'.jpg'), '/var/www/html/thumbnails/'+ videoID +'.jpg', function(e) {
        console.log(fileName + '.jpg uploaded to Streaming Server :)');
        conn.end();
      });
  
    });
  });
  conn.connect();
  </code></pre>
  
  <p>update: I tried this as well, but it won't connect again. </p>
  
  <pre><code>conn.put(fs.createReadStream('/var/www/ce-videoComplete/'+ videoID +'.flv'), '/home/wowza/content/'+ videoID +'.flv', function(e) {
    console.log(fileName + '.flv uploaded to Streaming Server :)');
    conn.end();
  
    conn.put(fs.createReadStream('/var/www/ce-thumbnails/'+ videoID +'.jpg'), '/var/www/html/thumbnails/'+ videoID +'.jpg', function(e) {
      console.log(fileName + '.jpg uploaded to Streaming Server :)');
      conn.end();
    });
  });
  </code></pre>