Core/Socket: Fix typo in constructor

Using moved objects is generally a bad idea

Thanks @Daejiv

Closes #12800