Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Example that does work
- setTimeout((function (_this) {
- _this.logger.debug("Trying to connect to TCP");
- _this.client.connect(_this.PORT, _this.HOST, (function(_this) {
- _this.logger.info("TCP connection success on %s:%s", _this.HOST, _this.PORT);
- })(_this))
- })(this), this.timeout * 1000);
- Example that doesn't work
- this.client.on("error", (function(_this) {
- _this.connected = false;
- _this.logger.debug("Can't connect, trying to reconnect.");
- _this.connect();
- })(this));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement