mirror of
https://github.com/smogon/pokemon-showdown.git
synced 2026-04-26 02:39:38 -05:00
Fix memory leak in ladders-remote
This commit is contained in:
parent
f4c680ac68
commit
b53480b364
|
|
@ -85,9 +85,9 @@ export class NetStream extends Streams.ReadWriteStream {
|
|||
response.setEncoding('utf-8');
|
||||
this.nodeReadableStream = response;
|
||||
this.response = response;
|
||||
resolveResponse(response);
|
||||
this.statusCode = response.statusCode || null;
|
||||
this.headers = response.headers;
|
||||
resolveResponse(response);
|
||||
response.on('data', data => {
|
||||
this.push(data);
|
||||
});
|
||||
|
|
|
|||
|
|
@ -79,6 +79,7 @@ class LoginServerInstance {
|
|||
this.openRequests--;
|
||||
return [json.json!, null];
|
||||
} catch (error) {
|
||||
this.openRequests--;
|
||||
return [null, error];
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user