Make test a bit more rigorous i guess
Factor out some nitty gritty test code
Test that we detect a close and then reconnect even if the close happens while blocked for write