node-i3
node-i3 copied to clipboard
I3IpcClient "connect" emit order is corrected.
I3IpcClient "connect" event emit is placed after "self._stream" assign.
why this was a problem? Does any code outside relies on ._stream being set?
yes, you are right, ._stream from the outside is not very good, but I needed for example a ._stream.destroy()
can you elaborate why? Maybe we need to add public api for that?
Close/destroy socket connection after a timeout: I'm waiting a window event but not longer than 30 seconds or another logic, for example.
Yes, .destroy() would be nice:
@@ -178,0 +179,5 @@ I3IpcClient.prototype.on = function(event, handler) {
+I3IpcClient.prototype.destroy = function() {
+ if (!this._stream) return;
+ this._stream.destroy();
+}