def disconnect(self):
if not self.sascfg.reconnect:<EOL><INDENT>return "<STR_LIT>"<EOL><DEDENT>pgm = b'<STR_LIT:\n>'+b'<STR_LIT>'<EOL>self.stdin[<NUM_LIT:0>].send(pgm)<EOL>while True:<EOL><INDENT>try:<EOL><INDENT>log = self.stderr[<NUM_LIT:0>].recv(<NUM_LIT>).decode(errors='<STR_LIT:replace>')<EOL><DEDENT>except (BlockingIOError):<EOL><INDENT>log = b'<STR_LIT>'<EOL><DEDENT>if len(log) > <NUM_LIT:0>:<EOL><INDENT>if log.count("<STR_LIT>") >= <NUM_LIT:1>:<EOL><INDENT>break<EOL><DEDENT><DEDENT><DEDENT>return log.rstrip("<STR_LIT>")<EOL>
This method disconnects an IOM session to allow for reconnecting when switching networks