Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closing sockets issue #2

Closed
Betta78 opened this issue May 31, 2017 · 2 comments
Closed

Closing sockets issue #2

Betta78 opened this issue May 31, 2017 · 2 comments
Assignees
Labels

Comments

@Betta78
Copy link

Betta78 commented May 31, 2017

It seems that there is bug in closing sockets.
The server using this module lists many CLOSE_WAIT related to BaseX Connection

@cmarchand cmarchand added the bug label Jun 1, 2017
@cmarchand cmarchand self-assigned this Jun 1, 2017
@cmarchand
Copy link
Owner

cmarchand commented Jun 1, 2017

The bug is pretty complex to solve :
I have to keep the connection open until all results (the item of the returned sequence) are fetched.
If you fetch all results, I can detect that sequence is at its end, and close the connection ; but if you do not use the result (you do not fetch until end), I can not detect you do not want anymore results, and have to keep the connection open.
But, the connection has a 5s timeout, so is closed after 5s of inactivity ; so it should be automatically closed.

I have changed the code to close the connection when the end of sequence is reached ; please have a test and let me know if it's OK for you. Well, it's not yet build...

cmarchand added a commit that referenced this issue Jun 1, 2017
@cmarchand
Copy link
Owner

cmarchand commented Jun 1, 2017

Release 1.1.0-RC2 published.
Add this to your pom.xml :

<dependency>
    <groupId>top.marchand.xml.ext-funct</groupId>
    <artifactId>basex</artifactId>
    <version>1.1.0-RC2</version>
</dependency>

There is still a log in default console when connection is closed. Will be removed in final release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants