Skip to content

Add command timeout#9

Open
jackeichen wants to merge 1 commit into
python-scsi:masterfrom
jackeichen:master
Open

Add command timeout#9
jackeichen wants to merge 1 commit into
python-scsi:masterfrom
jackeichen:master

Conversation

@jackeichen
Copy link
Copy Markdown

Add command timeout

@jackeichen
Copy link
Copy Markdown
Author

@rosjat @Flameeyes @sahlberg Hi guys, here is the expected change in the code. Please check and give the feedback.

This PR is related to python-scsi/python-scsi#149.

Use a const value "DEFAULT_TIMEOUT", to help to get the default timeout by:
from sgio import DEFAULT_TIMEOUT

Comment thread src/linux_sgio.pyx Outdated
from libc.errno cimport errno
from libc.stdlib cimport calloc, free

DEFAULT_TIMEOUT = 1800000
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is unessesary, you can simply pass the value in the execute method this is the default if you dont provide a vaklue in the call.

timeout=1800000

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it.

Add command timeout(2nd)
@jackeichen jackeichen marked this pull request as ready for review May 17, 2026 13:00
@jackeichen jackeichen requested a review from rosjat May 18, 2026 09:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants