Browse Source

Catch NullPointerException of Amazon AWS ELB during healthcheck

master
Sebastian Rieger 7 years ago
parent
commit
451d888829
  1. BIN
      VerteilteSysteme-Examples/build/RMIEchoServer.jar
  2. BIN
      VerteilteSysteme-Examples/build/RMIMandelbrotCalculationsServer.jar
  3. BIN
      VerteilteSysteme-Examples/build/TCPPerfServer.jar
  4. BIN
      VerteilteSysteme-Examples/build/TCPServer.jar
  5. BIN
      VerteilteSysteme-Examples/build/TCPServerMulti.jar
  6. BIN
      VerteilteSysteme-Examples/build/UDPServer.jar
  7. BIN
      VerteilteSysteme-Examples/build/UDPServerMulti.jar
  8. BIN
      VerteilteSysteme-Examples/build/UDPTimeCounterServer.jar
  9. 7
      VerteilteSysteme-Examples/src/verteiltesysteme/socket/simple/TCPServer.java

BIN
VerteilteSysteme-Examples/build/RMIEchoServer.jar

BIN
VerteilteSysteme-Examples/build/RMIMandelbrotCalculationsServer.jar

BIN
VerteilteSysteme-Examples/build/TCPPerfServer.jar

BIN
VerteilteSysteme-Examples/build/TCPServer.jar

BIN
VerteilteSysteme-Examples/build/TCPServerMulti.jar

BIN
VerteilteSysteme-Examples/build/UDPServer.jar

BIN
VerteilteSysteme-Examples/build/UDPServerMulti.jar

BIN
VerteilteSysteme-Examples/build/UDPTimeCounterServer.jar

7
VerteilteSysteme-Examples/src/verteiltesysteme/socket/simple/TCPServer.java

@ -21,9 +21,16 @@ class TCPServer {
BufferedReader inFromClient = new BufferedReader(new InputStreamReader(connectionSocket.getInputStream())); BufferedReader inFromClient = new BufferedReader(new InputStreamReader(connectionSocket.getInputStream()));
DataOutputStream outToClient = new DataOutputStream(connectionSocket.getOutputStream()); DataOutputStream outToClient = new DataOutputStream(connectionSocket.getOutputStream());
// Try/Catch hinzugefügt, nachdem bei Einsatz Amazon AWS (Healthcheck des ELB) clientSentence null war
try {
clientSentence = inFromClient.readLine(); clientSentence = inFromClient.readLine();
capitalizedSentence = clientSentence.toUpperCase() + '\n'; capitalizedSentence = clientSentence.toUpperCase() + '\n';
outToClient.writeBytes(capitalizedSentence); outToClient.writeBytes(capitalizedSentence);
} catch (IOException ioe) {
ioe.printStackTrace();
} catch (NullPointerException npe) {
npe.printStackTrace();
}
} }
} }
} }
Loading…
Cancel
Save