Guichaguri / MinimalFTP

A lightweight, simple FTP server. Pure Java, no dependencies.
Apache License 2.0
160 stars 45 forks source link

Improper connection closing. CPU usage 100% #9

Closed sealedtx closed 4 years ago

sealedtx commented 4 years ago

Improper closing by client causes infinite handling exception SocketException inside IOException catch block produced by reader.readline(): https://github.com/Guichaguri/MinimalFTP/blob/801754d65cf2005446e85cdfec16ffcb6efbbce1/src/main/java/com/guichaguri/minimalftp/FTPConnection.java#L558-L568

Due to simple return the thread ConnectionThread hangs forever and consume a lot of CPU because of handling exceptions and filling stacktraces.