@defer.inlineCallbacks
    def test_client_hanging(self):

        self.smppc_config.enquireLinkTimerSecs = 10
        self.smpps_config.inactivityTimerSecs = 2
        self.smpps_config.sessionInitTimerSecs = 1

        # Connect and bind
        yield self.smppc_factory.connectAndBind()
        self.assertEqual(self.smppc_factory.smpp.sessionState, SMPPSessionStates.BOUND_TRX)

        # Client's PDURequestReceived() will do nothing when receiving any reqPDU
        self.smppc_factory.lastProto.PDURequestReceived = lambda reqPDU: None
        # Client's sendRequest() will send nothing starting from this moment
        self.smppc_factory.lastProto.sendRequest = lambda pdu, timeout: defer.Deferred()

        # Wait
        yield waitFor(4)

        self.assertEqual(self.smppc_factory.smpp.sessionState, SMPPSessionStates.NONE)
Server will send an unbind request to client when inactivity
dataset/ETHPy150Open jookies/jasmin/jasmin/protocols/smpp/test/test_smpp_server.py/InactivityTestCases.test_client_hanging