Fix a dead lock in ServerBootstrap as described in #1175

- Reduce code duplication between bootstrap implementations