Skip to content
This repository was archived by the owner on Jan 9, 2023. It is now read-only.
This repository was archived by the owner on Jan 9, 2023. It is now read-only.

Server can't close connection before all upload buffer flushed. #137

@leonluyong

Description

@leonluyong

If client close the socket connection, socket sever will discount connection and un-pipe ClientStreamProcessor/CommandProcessor even processor still having buffer to flush. That will make cache file dead on temp folder.

We should wait for the ClientStreamProcessor/CommandProcessor to flush it’s buffer before unpiping the streams.

socket.on('close', () => { helpers.log(consts.LOG_INFO,${socket.remoteAddress}:${socket.remotePort} closed connection.); socket.unpipe(); streamProc.unpipe(); cmdProc.unpipe(); }).on('error', err => { helpers.log(consts.LOG_ERR, err.message); });

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions