F/unix stream spinning fix

This branch contains a fix for #308.

Please merge to both 3.6 and master.