Otherwise returning None indicates that the write would block and nothing was actually written. Fixes issue #3990.