Revert "Revert "Revert "Major enchancement to network part. One bug when running with multiple peers: when one looses connection, this automatically trigs the other network connections to fail - however they instantly reconnect. This has probably something to do with syncronize-barriers when adding data to send buffer."""

This reverts commit 0d035c16cf4fc0682ea0bae162515fac421f2c29.
Revert "Revert "Major enchancement to network part. One bug when running with multiple peers: when one looses connection, this automatically trigs the other network connections to fail - however they instantly reconnect. This has probably something to do with syncronize-barriers when adding data to send buffer.""

This reverts commit d9a8667e183b4caa46d3b7d6cf5bc7c7d43ea2b7.