这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@AgentConDier
Copy link
Contributor

Add a catch to the try (LocalSocket con = listen.accept(); ...) { statement in order to handle unexpected client disconnects.

A simple test case is:

python -c "import socket
s=socket.socket(socket.AF_UNIX)
s.connect(b'\0com.termux.api://listen')
s.close()"

Before, this crashed the service, causing connection refused errors until Termux:API was force-stopped via app info

@agnostic-apollo agnostic-apollo merged commit a080909 into termux:master Jul 18, 2022
@agnostic-apollo
Copy link
Member

Thanks.

@AgentConDier AgentConDier deleted the socket-errorhandling branch July 31, 2022 11:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants