Comments (3)
Could you please try whether removing the following lines in
AFUNIXServerSocket#close() would do what you want?
if (boundEndpoint != null) {
NativeUnixSocket.unlink(boundEndpoint.getSocketFile());
}
Cheers,
Christian
Original comment by ckkohl79
on 5 Oct 2010 at 6:22
- Changed state: Started
- Added labels: Milestone-Release1.4, OpSys-All, Priority-Low, Type-Enhancement
- Removed labels: Priority-Medium, Type-Defect
from junixsocket.
I'm sure this would work. However, I realized I don't need it. I can just
always open the socket under a temporary name (whether there is already a
running instance or not) and rename it. junixsocket will try to delete the
temporary name and fail. So you can forget this weird request.
This approach also solves the other issue (6) I commented on. When I want to
gracefully shut down, I rename the socket to a new name, so it can no longer
receive "real" connections. (Or in the case of take-over, I link the socket to
a new name, then rename a new socket over it.) Then I connect to it (under the
new name) and send a shutdown message in my application protocol. Assuming the
OS doesn't reorder connections, I can be sure that by the time I accepted this
message, all real connections had already been accepted.
In other words, by using filesystem operations, I can achieve the "stop
listening, but continue to accept backlogged connections" semantic I was
looking for. Cool.
Original comment by [email protected]
on 6 Oct 2010 at 7:54
from junixsocket.
Agreed to solve this outside of junixsocket.
Closing.
Original comment by ckkohl79
on 20 Feb 2013 at 12:01
- Changed state: WontFix
from junixsocket.
Related Issues (20)
- connection errors can leak sockets (file handles) HOT 6
- Sockets not actually closing HOT 3
- IOException when using BufferedReader.readLine() HOT 3
- typo error in build.xml HOT 2
- Inpustream don't implement the available() function HOT 3
- Wrong mapping of java.net.SocketOptions values into NativeUnixSocket.c HOT 5
- Build should not assume isLinux can build -m64 HOT 1
- socket.setSoTimeout(100) causes error "protocol not available" HOT 7
- Allow specifying the native lib location via LD_LIBRARY_PATH HOT 1
- expectBoolean for SO_SNDBUF value HOT 1
- Support SO_PEERCRED socket option HOT 2
- Native library fails to load on rhel4 32-bit when crosscompiled from rhel5 64-bit HOT 1
- Potential memory corruption in native read/write functions HOT 2
- Warning message during build: 'includeantruntime' was not set...
- SocketTimeout not handled properly HOT 1
- Add project libraries to maven repository HOT 2
- accept() does not throw SocketException on close() HOT 1
- Java security fix breaks junixsocket RMI HOT 2
- Multithreading 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 junixsocket.