Comments (9)
I'm having the same issue.
from pub_api_client.
The example code can be used to replicate the issue. The following code hangs for me even with the close()
call.
import 'package:pub_api_client/pub_api_client.dart';
void main() async {
final client = PubClient();
final packageScore = await client.packageScore('fvm');
client.close();
print('Package Score: $packageScore');
}
from pub_api_client.
BTW, thanks for this package. It's quite useful.
from pub_api_client.
@mschwartz did you try calling close
on the client?
You can do the following way.
final client = PubClient();
final packageScore = await client.packageInfo('provider');
client.client?.close();
from pub_api_client.
I can do that, thanks.
You still might consider adding a close() method on the PubClient that does the client?close(). If we use that new close() method and you later implement code that requires more cleanup, we all get it for free.
Again, thanks for this package!
from pub_api_client.
Thanks for adding the close method.
However, the issue persists even with calling client.client?.close().
If I comment out the line that calls client.anymethod(), the program exits immediately. Otherwise there's a several second pause at the end.
I've tried creating the client and closing it for each method call as well as one global client that I reuse and close before program is finished.
I could call exit(), but you might want to investigate this (or not :))
from pub_api_client.
@mschwartz based on my research it seems there are some open issues in regards to the HttpClient, some even point at malformed responses, so I am not 100% sure if this something that needs to be fixed on pub_api_client
Did you fix to close after each method work?
from pub_api_client.
Close after each method did not solve the problem. I tried both ways: create, query, close, and create, query, query….
from pub_api_client.
Not being able to replicate this. If there is a sample code that I can use to replicate it would be great
from pub_api_client.
Related Issues (11)
- Expose model classes
- PackageScore fields can be null HOT 6
- How to authenticate the user for likes HOT 3
- Is it possible to get the documentation of a specific package in markdown? HOT 1
- feature request: expose package license HOT 1
- checkLatest is referenced in the readme but no longer exists HOT 4
- feature request: expand fetchFlutterFavorites HOT 6
- Dependency upgrade failed with freezed HOT 2
- feature request: add support for Cloudsmith HOT 1
- Where can I find user token on my local machine? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pub_api_client.