Closed rafaelcorreiapoli closed 5 years ago
push.on('response', stream => { });
should give you a state in which all the data has been received by the server.
Closing, if you have any other questions let me know!
@gabrielcsapo @rafaelcorreiapoli
push.on('response', () => {}) doesn't work that well i tried it because i needed to execute another git command right after the push that was async i tried it with the response listener but it just hung up the whole "end rsp" cycle and the client which pushed the changes also hung up because the server didn't respond anymore
My final solution was to wait for the response to finish and then execute my command
You can do this with
push.res.on("finish", () => {
// execute stuff
});
push.accept();
Just put this inside the repos on push listener and you are good to go ^-^
Hi! How can I know when the push has finished sending all data? The current event for
push
is triggered before all data is sent to the server