From 79faae857dbdf79432216eb3ce02a95830012b1b Mon Sep 17 00:00:00 2001 From: Rhys Williams Date: Thu, 4 Oct 2018 12:54:25 +1000 Subject: [PATCH 1/4] Update TcpSocket.js --- TcpSocket.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TcpSocket.js b/TcpSocket.js index bfc09b6..650b22f 100644 --- a/TcpSocket.js +++ b/TcpSocket.js @@ -8,7 +8,7 @@ 'use strict'; -global.process = require('process'); // needed to make stream-browserify happy +global.process = global.process || require('process'); // needed to make stream-browserify happy var Buffer = global.Buffer = global.Buffer || require('buffer').Buffer; var util = require('util'); From 102a4f3629ede92be6b51449b10441a7bfd2e621 Mon Sep 17 00:00:00 2001 From: Rhys Williams Date: Thu, 4 Oct 2018 13:17:23 +1000 Subject: [PATCH 2/4] Update TcpSocket.js --- TcpSocket.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/TcpSocket.js b/TcpSocket.js index 650b22f..a71477e 100644 --- a/TcpSocket.js +++ b/TcpSocket.js @@ -8,7 +8,11 @@ 'use strict'; -global.process = global.process || require('process'); // needed to make stream-browserify happy +// if global.process does not have nextTick, redefine global.process. +if(!(global.process && global.process.nextTick)){ + global.process = require('process'); // needed to make stream-browserify happy +} + var Buffer = global.Buffer = global.Buffer || require('buffer').Buffer; var util = require('util'); From f6846ae4af3e477f1780f25464c10cc55ef66d0b Mon Sep 17 00:00:00 2001 From: Rhys Williams Date: Tue, 5 Feb 2019 15:13:42 +1100 Subject: [PATCH 3/4] Update TcpSocket.js irritating logging --- TcpSocket.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TcpSocket.js b/TcpSocket.js index a71477e..ded7ce0 100644 --- a/TcpSocket.js +++ b/TcpSocket.js @@ -73,7 +73,7 @@ TcpSocket.prototype._debug = function() { if (__DEV__) { var args = [].slice.call(arguments); args.unshift('socket-' + this._id); - console.log.apply(console, args); + //console.log.apply(console, args); } }; From dca9efb8c4519e3983ac9e452e37bdc4aaf9df85 Mon Sep 17 00:00:00 2001 From: Rhys Williams Date: Tue, 5 Feb 2019 15:15:10 +1100 Subject: [PATCH 4/4] Update package.json --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e698267..3572026 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-native-tcp", - "version": "3.3.0", + "version": "3.3.1", "description": "node's net API for react-native", "main": "TcpSockets.js", "scripts": {