title: Cannot enqueue Handshake after invoking quit
body: <p>I have implemented the following code:</p>
  <pre><code>module.exports = {
      getDataFromUserGps: function(callback)
      {
          connection.connect();
          connection.query(&quot;SELECT * FROM usergps&quot;, 
              function(err, results, fields) {
                  if (err) return callback(err, null);
                  return callback(null, results);
              }
          ); 
          connection.end();
      },
      loginUser: function(login, pass, callback)
      {
          connection.connect();
          connection.query(
              &quot;SELECT id FROM users WHERE login = ? AND pass = ?&quot;,
              [login, pass],
              function(err, results, fields) 
              {
                  if (err) return callback(err, null);
                  return callback(null, results);
              }
          ); 
          connection.end();
      },
      getUserDetails: function(userid, callback)
      {
          connection.connect();
          connection.query(
              &quot;SELECT * FROM userProfilDetails LEFT JOIN tags ON userProfilDetails.userId = tags.userId WHERE userProfilDetails.userid = ?&quot;,
              [userid],
              function(err, results, fields)
              {
                  if (err) return callback(err, null);
                  return callback(null, results);
              }
          );
          connection.end();
      },
      addTags: function(userId, tags)
      {
          connection.connect();
          connection.query(
              &quot;INSERT INTO tag (userId, tag) VALUES (?, ?)&quot;,
              [userId, tags],
              function(err, results, fields)
              {
                  if (err) throw err;
              }
          )
          connection.end();
      }
  }
  </code></pre>
  <p>Everything works great only for the first time. If I want to &quot;use&quot; the query for the second time I get the following error:</p>
  <pre><code>Cannot enqueue Handshake after invoking quit
  </code></pre>
  <p>I have tried not to <code>.end()</code> connections but it didn't help.</p>
  <p>How can I fix this issue?</p>