I was unable to close transport layer (TServerSocket). I have examined library and I have found little problem (my opinion) in TServerSocket inheritance. TServerSocket inherits from TServerTransportBase and TSocketBase. close() method is inherited from TServerTransportBase and this method is just dummy method. Real method (which closes the socket) in TSocketBase is hidden.