Cannot enqueue Handshake after invoking quit

前端 未结 10 2300
小鲜肉
小鲜肉 2020-11-28 02:59

I have implemented the following code:

module.exports = {
    getDataFromUserGps: function(callback)
    {
        connection.connect();
        connection.qu         


        
10条回答
  •  粉色の甜心
    2020-11-28 03:47

    inplace of connection.connect(); use -

    if(!connection._connectCalled ) 
    {
    connection.connect();
    }
    

    if it is already called then connection._connectCalled =true,
    & it will not execute connection.connect();

    note - don't use connection.end();

提交回复
热议问题