[sr-dev] git:andrei/send_flags: core: new close after send and reuse only script functions