Closing data server by default when the first connection is received, i.e data server is automatically closed when socket is closed