Added server socket closing at shutdown