socket close on send buffer clear or timeout