summaryrefslogtreecommitdiff
path: root/lingucomponent
diff options
context:
space:
mode:
authorAndrzej Hunt <andrzej@ahunt.org>2021-07-17 09:42:47 +0200
committerAndrzej Hunt <andrzej@ahunt.org>2021-07-24 09:51:36 +0200
commit2855f12072023930a15ea852e40d05de4a6be164 (patch)
tree8bfb464d68dfa6d2b521de695f0c32c42b08dc7f /lingucomponent
parent77a192aa016279acc0b0f9df584d1ce31bde41a4 (diff)
sdremote: close BufferedStreamSocket on destruction
This follows the pattern in osl::Socket which also cleans up on destruction if necessary. By closing on destruction we can avoid leaking the underlying socket or filedescriptor in the numerous scenarios where we throw away the socket without bothering to call close(). This isn't a big deal in normal usage - we don't use many sockets in the first place - but you can quickly run out of filedescriptors when running sufficiently complex tests. We also need to make BufferedStreamSocket final to avoid triggering loplugin:fragiledestructor - BufferedStreamSocket probably should have been final anyway, so there's no reason not to do so. Change-Id: I90c271df4b598a6c2b326fde13543e6b27d7a110 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119093 Tested-by: Jenkins Reviewed-by: Andrzej Hunt <andrzej@ahunt.org>
Diffstat (limited to 'lingucomponent')
0 files changed, 0 insertions, 0 deletions