@martinm When an incoming FIN packet is received from the remote endpoint, the socket is automatically properly closed unless the allowHalfOpen option is set. If that option is set, the socket is properly closed at the time when both an incoming FIN has been received and the local user has called the end method on the socket (in any order). Nothing is done at garbage collection time, so if you use the allowHalfOpen property, remember to close the socket by calling the end method. If the allowHalfOpen is not set, you can still use the end method to send your own FIN packet.