net/smc: improve close of terminated socket