Overview
Comment: | OFStream: Always cancel async requests on close
This avoids accidentally trying to remove a closed file descriptor from |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
321fa12f9ad0b42fe908b798e2890e36 |
User & Date: | js on 2020-01-07 20:36:33 |
Other Links: | manifest | tags |
Context
2020-01-07
| ||
22:59 | OFKernelEventObserver: Fix read buffers, select() check-in: 23ff70bec4 user: js tags: trunk | |
20:36 | OFStream: Always cancel async requests on close check-in: 321fa12f9a user: js tags: trunk | |
20:28 | OFKernelEventObserver: Remove queueing of actions check-in: 24eff635db user: js tags: trunk | |
Changes
Modified src/OFStream.m from [749b5fd798] to [2c231bfb94].
︙ | ︙ | |||
1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 | [self freeMemory: _readBufferMemory]; _readBuffer = _readBufferMemory = readBuffer; _readBufferLength += length; } - (void)close { [self freeMemory: _readBufferMemory]; _readBuffer = _readBufferMemory = NULL; _readBufferLength = 0; [self freeMemory: _writeBuffer]; _writeBuffer = NULL; _writeBufferLength = 0; _writeBuffered = false; _waitingForDelimiter = false; } @end | > > > > | 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 | [self freeMemory: _readBufferMemory]; _readBuffer = _readBufferMemory = readBuffer; _readBufferLength += length; } - (void)close { #ifdef OF_HAVE_SOCKETS [self cancelAsyncRequests]; #endif [self freeMemory: _readBufferMemory]; _readBuffer = _readBufferMemory = NULL; _readBufferLength = 0; [self freeMemory: _writeBuffer]; _writeBuffer = NULL; _writeBufferLength = 0; _writeBuffered = false; _waitingForDelimiter = false; } @end |