Joystream / joystream

Joystream Monorepo
http://www.joystream.org
GNU General Public License v3.0
1.42k stars 115 forks source link

[Colossus] fix: Unhandled event on Superagent due to timeout #5007

Closed zeeshanakram3 closed 10 months ago

zeeshanakram3 commented 10 months ago

addresses #4995

Problem

When a timeout is reached, Superagent internally only closes the request stream and not the response, however in nodejs, if the request prematurely closes, and response is not finished then response instance also emits the error event, so we should also handle that (which was not handled previously).