I have to execute code, when twisted reactor stops. Is there any standart way to do this?
The correct way to do this is with reactor.addSystemEventTrigger. but you probably don't need to do it. Please be more specific in future questions.
reactor.addSystemEventTrigger