Include end-of-file marker
This commit is contained in:
parent
21d6e57cc2
commit
b71b7780bb
|
|
@ -67,11 +67,17 @@ new_client = function(client, req) {
|
||||||
target.on('end', function() {
|
target.on('end', function() {
|
||||||
log('target disconnected');
|
log('target disconnected');
|
||||||
client.close();
|
client.close();
|
||||||
|
if (rs) {
|
||||||
|
rs.end('\'EOF\'];\n');
|
||||||
|
}
|
||||||
});
|
});
|
||||||
target.on('error', function() {
|
target.on('error', function() {
|
||||||
log('target connection error');
|
log('target connection error');
|
||||||
target.end();
|
target.end();
|
||||||
client.close();
|
client.close();
|
||||||
|
if (rs) {
|
||||||
|
rs.end('\'EOF\'];\n');
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
client.on('message', function(msg) {
|
client.on('message', function(msg) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue