Eno Compton
Eno Compton
@magnus0422 are you using Flask? A little toy reproduction would help us understand what's going wrong here.
Thanks, @magnus0422. I don't see why we can't just properly fix this. Updated the title to make it clear that this library needs some work to function with gevent.
I think we can follow [the approach here](https://github.com/MagicStack/asyncpg/blob/master/asyncpg/connect_utils.py#L741) to gain access to the socket, do a read and write, close the transport, and then create a new connection that uses...
Depends on https://github.com/enocom/asyncpg/commit/2d3bbb8e90078fdae7fdb925e425d521b376f583 (which would have to be a PR into asyncpg)
Improved close behavior here: https://github.com/GoogleCloudPlatform/alloydb-go-connector/pull/491, but the build still failed here: https://github.com/GoogleCloudPlatform/alloydb-go-connector/actions/runs/7703646936/job/20994448297.
instance_test.go:230: failed to retrieve connect info: Dial error: context was canceled or expired before refresh completed (instance URI = "my-project/my-region/my-cluster/my-instance")
``` === RUN TestRefreshDuration/when_expiration_is_greater_than_1_hour panic: runtime error: invalid memory address or nil pointer dereference [signal 0xc0000005 code=0x0 addr=0x0 pc=0x14092a78a] goroutine 39 [running]: golang.org/x/oauth2.(*Token).Type(0x0) C:/Users/runneradmin/go/pkg/mod/golang.org/x/[email protected]/token.go:64 +0x2a golang.org/x/oauth2.(*Token).SetAuthHeader(0x0, 0xc0000e0d00) C:/Users/runneradmin/go/pkg/mod/golang.org/x/[email protected]/token.go:85 +0x39 golang.org/x/oauth2.(*Transport).RoundTrip(0xc0001d0700,...
Closing -- this seems to be an artifact of duplicate refreshes that we fixed in a release after this issue was opened.
I got started on this and followed [the steps here](https://github.com/Homebrew/homebrew-core/blob/241026a3fb6b1bba5847567f91a2d50698593e96/CONTRIBUTING.md#to-add-a-new-formula-for-foo-version-234-from-url). The audit step said this: ``` $ brew audit --new alloydb-auth-proxy alloydb-auth-proxy * GitHub repository not notable enough (