node-steam-client icon indicating copy to clipboard operation
node-steam-client copied to clipboard

self._connection.destroy();

Open cybergodjsp opened this issue 7 years ago • 1 comments

C:\csgoo\csgo\csgo-bot-master\node_modules\steam-client\lib\cm_client.js
:177
                                self._connection.destroy();
                                                 ^

TypeError: Cannot read property 'destroy' of undefined
    at Socket.<anonymous> (C:\csgoo\csgo\csgo-bot-master\node_modules\st
eam-client\lib\cm_client.js:177:22)
    at Object.onceWrapper (events.js:285:13)
    at Socket.emit (events.js:202:15)
    at Socket._onTimeout (net.js:447:8)
    at listOnTimeout (timers.js:327:15)
    at processTimers (timers.js:271:5)

changed 2 things

I was erroring on

handlers[EMsg.ChannelEncryptRequest] = function(data) {
	// assume server isn't dead
	this._connection.setTimeout(0);

I made it

handlers[EMsg.ChannelEncryptRequest] = function(data) {
	// assume server isn't dead
	this._connection.setTimeout(5000);

Was

self._connection.setTimeout(1000, function() { self.emit('debug', 'socket timed out'); self._connection.destroy(); });

made it

			self._connection.setTimeout(10000, function() {
				self.emit('debug', 'socket timed out');
				self._connection.destroy();
			});

cybergodjsp avatar Feb 09 '19 00:02 cybergodjsp

This isn't really supported anymore. Please use steam-user v4.

DoctorMcKay avatar Feb 09 '19 04:02 DoctorMcKay