• Hi everybody,

    Do we have an option to cleanup socket object without a hard reset?

    I'm connecting to a server with a tricky path and I need to try to reconnect with net.connect on any error. But this process consumes memory on every attempt.

    Minimal pseudo-like code is as follows:

    function MyClass(....){
        this.socket = null 
    }
    
    MyClass.prototype.connect = function (){
        this.socket = net.connect(....)
    }
    
    var my = new MyClass(..)
    my.connect()
    my.connect()
    my.connect()
    
About

Avatar for ceremcem @ceremcem started