Handle null socket messages and add text coloring

This commit is contained in:
sigonasr2, Sig, Sigo 2022-05-03 14:12:26 +00:00
parent f3e70a0218
commit 7241bd4aeb
2 changed files with 30 additions and 27 deletions

View File

@ -23,6 +23,7 @@ public class sigServer {
BufferedReader in = new BufferedReader(new InputStreamReader(client.getInputStream())); BufferedReader in = new BufferedReader(new InputStreamReader(client.getInputStream()));
String line; String line;
line=in.readLine(); //Read the first line, this should be our request. line=in.readLine(); //Read the first line, this should be our request.
if (line!=null) {
String[] splitter = line.split(Pattern.quote(" ")); String[] splitter = line.split(Pattern.quote(" "));
if (splitter.length==3) { if (splitter.length==3) {
//This is valid. //This is valid.
@ -54,7 +55,8 @@ public class sigServer {
while (!(line=in.readLine()).isBlank()) { while (!(line=in.readLine()).isBlank()) {
//System.out.println(line); //System.out.println(line);
} }
} catch(SocketException e) { }
} catch(SocketException|NullPointerException e) {
e.printStackTrace(); e.printStackTrace();
} }
} }

View File

@ -48,6 +48,7 @@
body{ body{
font-family: Garamond, 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; font-family: Garamond, 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
background-color:$SITE_BACKCOL; background-color:$SITE_BACKCOL;
color: #991199;
} }
.content{ .content{