now waiting for response to be stored before ending streaming request
This commit is contained in:
parent
28fa5349d7
commit
489a47b9bf
15
dist/dockersock.classes.dockersock.js
vendored
15
dist/dockersock.classes.dockersock.js
vendored
File diff suppressed because one or more lines are too long
2
dist/index.js
vendored
2
dist/index.js
vendored
@ -2,4 +2,4 @@
|
||||
require("typings-global");
|
||||
var dockersock_classes_dockersock_1 = require("./dockersock.classes.dockersock");
|
||||
exports.Dockersock = dockersock_classes_dockersock_1.Dockersock;
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsUUFBTyxnQkFBZ0IsQ0FBQyxDQUFBO0FBQ3hCLDhDQUF5QixpQ0FBaUMsQ0FBQztBQUFuRCxnRUFBbUQifQ==
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsUUFBTyxnQkFBZ0IsQ0FBQyxDQUFBO0FBQ3hCLDhDQUEyQixpQ0FBaUMsQ0FBQztBQUFwRCxnRUFBb0QifQ==
|
@ -34,11 +34,9 @@ describe("dockersock", function () {
|
||||
it("should return a change Objservable", function (done) {
|
||||
this.timeout(10000);
|
||||
testDockersock.getChangeObservable();
|
||||
setTimeout(() => {
|
||||
testDockersock.endRequests();
|
||||
done();
|
||||
}, 5000);
|
||||
testDockersock.endRequests();
|
||||
done();
|
||||
});
|
||||
});
|
||||
});
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGVzdC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInRlc3QudHMiXSw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FDLENBQUM7WUFDcEIsY0FBYyxDQUFDLG1CQUFtQixFQUFFLENBQUM7WUFDckMsY0FBYyxDQUFDLFdBQVcsRUFBRSxDQUFDO1lBQzdCLElBQUksRUFBRSxDQUFDO1FBQ1gsQ0FBQyxDQUFDLENBQUE7SUFDTixDQUFDLENBQUMsQ0FBQztBQUNQLENBQUMsQ0FBQyxDQUFDIn0=
|
@ -35,10 +35,8 @@ describe("dockersock", function () {
|
||||
it("should return a change Objservable", function (done) {
|
||||
this.timeout(10000);
|
||||
testDockersock.getChangeObservable();
|
||||
setTimeout(() => {
|
||||
testDockersock.endRequests();
|
||||
done();
|
||||
}, 5000);
|
||||
testDockersock.endRequests();
|
||||
done();
|
||||
})
|
||||
});
|
||||
});
|
@ -220,9 +220,11 @@ export class Dockersock {
|
||||
return done.promise;
|
||||
};
|
||||
endRequests() {
|
||||
this.requestObjectmap.forEach((itemArg: plugins.request.Request) => {
|
||||
itemArg.emit("end");
|
||||
});
|
||||
this.requestObjectmap.wipe();
|
||||
setTimeout(() => {
|
||||
this.requestObjectmap.forEach((itemArg: plugins.request.Request) => {
|
||||
itemArg.emit("end");
|
||||
});
|
||||
this.requestObjectmap.wipe();
|
||||
}, 5000);
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue
Block a user