in Education by
I am getting the following error trying to read from a socket. I'm doing a readInt() on that InputStream, and I am getting this error. Perusing the documentation this suggests that the client part of the connection closed the connection. In this scenario, I am the server. I have access to the client log files and it is not closing the connection, and in fact its log files suggest I am closing the connection. So does anybody have an idea why this is happening? What else to check for? Does this arise when there are local resources that are perhaps reaching thresholds? I do note that I have the following line: socket.setSoTimeout(10000); just prior to the readInt(). There is a reason for this (long story), but just curious, are there circumstances under which this might lead to the indicated error? I have the server running in my IDE, and I happened to leave my IDE stuck on a breakpoint, and I then noticed the exact same errors begin appearing in my own logs in my IDE. Anyway, just mentioning it, hopefully not a red herring. :-( JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)

1 Answer

0 votes
by
There are several possible causes. The other end has deliberately reset the connection, in a way which I will not document here. It is rare, and generally incorrect, for application software to do this, but it is not unknown for commercial software. More commonly, it is caused by writing to a connection that the other end has already closed normally. In other words an application protocol error. It can also be caused by closing a socket when there is unread data in the socket receive buffer. In Windows, 'software caused connection abort', which is not the same as 'connection reset', is caused by network problems sending from your end. There's a Microsoft knowledge base article about this.

Related questions

0 votes
    I am getting the following error trying to read from a socket. I'm doing a readInt() on that ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 29, 2022 in Education by JackTerrance
0 votes
    I haven't been able to find this explicitly stated anywhere yet, but a bunch of examples I've ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 10, 2022 in Education by JackTerrance
0 votes
    I've tried to test socket connection in Java, but failed. Here is my code (two simple applications, ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 18, 2022 in Education by JackTerrance
0 votes
    I've tried to test socket connection in Java, but failed. Here is my code (two simple applications, ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 16, 2022 in Education by JackTerrance
0 votes
    What does the command git reset –hard HEAD ~3 do? A. Merges the last 3 commits to the master B. Discards ... nothing D. Resets the head to 3 commits before the current commit...
asked Dec 23, 2022 in Technology by JackTerrance
0 votes
    What is the command to reset your index as well as the working directory to the state of your last commit? A. git clean B. git reset C. git revert D. git checkout...
asked Dec 21, 2022 in Technology by JackTerrance
0 votes
    What does the command Git reset –- soft HEAD^ perform? A. Moves commit to one after current head B. Moves commit ... . Moves commit to the first head D. None of the options...
asked Dec 21, 2022 in Education by JackTerrance
0 votes
    I have two buttons in MainActivity, the first one opens a custom DialogFragment with some spinners and in ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 11, 2022 in Education by JackTerrance
0 votes
    I'm using JEE and I created EJB-Singleton. It has as a field LRUMap, which represents cache to ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 7, 2022 in Education by JackTerrance
0 votes
    I'm using const embed = new Discord.RichEmbed(); for my embeds. How do I reset the Embed values? ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 29, 2022 in Education by JackTerrance
0 votes
    In my password reset function the user can put in whatever he/she wants. It does not even needs ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 17, 2022 in Education by JackTerrance
0 votes
    I'm making a drag and drop game for my A level computing coursework. My drag and drop works fine, but I have 6 ... >= 190 && theButton.Location.X = 42 && theButton.Location.Y...
asked Apr 9, 2022 in Education by JackTerrance
0 votes
    I want to create a request from my application. (iOS and Android - Coded with Xamarin). Explaination: ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 2, 2022 in Education by JackTerrance
0 votes
    I have made some changes to a file that has been committed a few times as part of a group of files, but ... former state in the past Select the correct answer from above options...
asked Jan 31, 2022 in Education by JackTerrance
0 votes
    How can I reset the AUTO_INCREMENT of a field? I want it to start counting from 1 again. Select the correct answer from above options...
asked Jan 26, 2022 in Education by JackTerrance
...