Fixing unittest
Better docs
Fix Don't crash on connection refused errors (and similar) #4810