We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Java版本调用时,Ocr.class#sendJsonToOcr,writer.write(sw.getBuffer().toString());前面添加一段 if (OcrMode.SOCKET_SERVER == mode) { writer.close(); reader.close(); clientSocket.close(); clientSocket = new Socket(serverAddr, serverPort); clientSocket.setKeepAlive(true); reader = new BufferedReader(new InputStreamReader(clientSocket.getInputStream(), StandardCharsets.UTF_8)); writer = new BufferedWriter(new OutputStreamWriter(clientSocket.getOutputStream(), StandardCharsets.UTF_8)); } 长连接第二次调用时会导致 Software caused connection abort: socket write error,所以套接字启动时改为短连接比较好
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Java版本调用时,Ocr.class#sendJsonToOcr,writer.write(sw.getBuffer().toString());前面添加一段
if (OcrMode.SOCKET_SERVER == mode) {
writer.close();
reader.close();
clientSocket.close();
clientSocket = new Socket(serverAddr, serverPort);
clientSocket.setKeepAlive(true);
reader = new BufferedReader(new InputStreamReader(clientSocket.getInputStream(), StandardCharsets.UTF_8));
writer = new BufferedWriter(new OutputStreamWriter(clientSocket.getOutputStream(), StandardCharsets.UTF_8));
}
长连接第二次调用时会导致 Software caused connection abort: socket write error,所以套接字启动时改为短连接比较好
The text was updated successfully, but these errors were encountered: