network: Fix for not adding connected socket if it was disconnected