mirror of
https://github.com/OpenHands/OpenHands.git
synced 2025-12-25 21:36:52 +08:00
Remove hard error on session reuse (#7026)
Co-authored-by: Tim O'Farrell <tofarr@gmail.com>
This commit is contained in:
parent
2e4911dc59
commit
d0cde6baf2
@ -22,7 +22,7 @@ class HttpSession:
|
||||
logger.error(
|
||||
'Session is being used after close!', stack_info=True, exc_info=True
|
||||
)
|
||||
raise RuntimeError('Session is being used after close!')
|
||||
self.session = requests.Session()
|
||||
return getattr(self.session, name)
|
||||
|
||||
@property
|
||||
@ -31,7 +31,7 @@ class HttpSession:
|
||||
logger.error(
|
||||
'Session is being used after close!', stack_info=True, exc_info=True
|
||||
)
|
||||
raise RuntimeError('Session is being used after close!')
|
||||
self.session = requests.Session()
|
||||
# Cast to CaseInsensitiveDict[str] since mypy doesn't know the exact type
|
||||
return cast(CaseInsensitiveDict[str], self.session.headers)
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user