node-tftp
node-tftp copied to clipboard
Delay socket close so to (re)send final ACK if needed.
The https://www.rfc-editor.org/rfc/rfc1350, section 6, Normal Termination recommends not to close client connection immediately, but rather wait for a while, as the final ACK may be lost in the network. In such case the client would re-transmit final DATA packet expecting server to send a final ACK again.
This is also fixing https://github.com/gagle/node-tftp/issues/5 when socket is closed too fast, effectively causing final ACK to be lost.