INNER CODE UNIT · Python

bytes_written

Matteo842/SaveState · main.py:391

                        if bytes_written == -1:
                            logging.error(f"Failed to write to local socket: {local_socket.errorString()}")
                        elif not local_socket.waitForBytesWritten(socket_write_timeout):
                            logging.warning("Timeout waiting for bytes written to local socket.")
                        else:
                            logging.debug("Signal 'show' sent successfully.")
                        local_socket.disconnectFromServer()
                        local_socket.close()
                        logging.info("Signal sent. Exiting this instance.")
                        if shared_memory.isAttached():
                            shared_memory.detach()
                        # Clean up file lock on Linux
                        if is_linux:
                            cleanup_lock_file()
                        sys.exit(0)
                    else:
                        # Likely stale shared memory/socket; attempt automatic cleanup & retry
                        logging.error(f"Unable to connect to existing instance server '{LOCAL_SERVER_NAME}': {local_socket.errorString()} - attempting stale lock cleanup and retry...")

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…