fixed refactoring mistake in Socket.php