DoctorMcKay / node-globaloffensive

A Node.js module to connect to and interact with the CS2 game coordinator. Mostly used to get item data.
https://www.npmjs.com/package/globaloffensive
MIT License
262 stars 61 forks source link

Avoid event listeners leak #36

Closed Luluno01 closed 4 years ago

Luluno01 commented 5 years ago

Bug Description

If somehow the server won't respond to an in-game item query (via inspectItem), there will be a inspectItem#<item-id> event listener leak.

If you send the inspect requests too frequently or send invalid requests, the server will ignore some of the requests, i.e. the server may never respond to some specific requests. This will cause a event listener leak until the same item is finally "inspected" again successfully.