subgrounds icon indicating copy to clipboard operation
subgrounds copied to clipboard

SSL ResourceWarning thrown during normal operation

Open 0xMochan opened this issue 10 months ago • 0 comments

Describe the bug Normally use Subgrounds via async or sync interface (using query grouping or not) and observe ResourceWarnings.

Expected behavior No ResourceWarning.

Screenshots

sys:1: ResourceWarning: unclosed <ssl.SSLSocket fd=1588, family=23, type=1, proto=0, laddr=('local_address'), raddr=('remote_address')>

Additional context This pesky problem was introduced during the async aubgrounds update. It can be safely ignored and even filterd out via the warnings module but ideally we don't have this lingering around.

import warnings                                                           
                                                                              
warnings.filterwarnings('ignore', category=ResourceWarning)

(Fixes #52)

  1. Figure out it's correlation between sync and async mode
  • I have a feeling it's because query grouping is great for async but a bit weird for sync when using the httpx library.
  1. Fix it for each mode

0xMochan avatar Mar 28 '24 23:03 0xMochan