fixed deadlock, removed unecessary goroutine in socketHandler