If the timeout is specified via setSoLinger() , close() blocked until the closed hand shake is completed or until the specified time has setSoLinger() .
However, close() does not indicate that the completion of the handshake is not completed, even if the time limit setSoLinger() expires before the completion of the final sequence.
In other words, setSoLinger() does not provide any additional guarantee for the application in the current Implementations.
Here is the source of information.
source share