Fix race condition in port allocation

Fix race condition in port allocation by eliminating a goroutine.  @peterbourgon @ohm @elenadeneva92 
Thanks for catching that.