Added locking to dynamic socket list