|
@@ -37,12 +37,13 @@ class ReceiveThread extends Thread {
|
37
|
37
|
}
|
38
|
38
|
public void run()
|
39
|
39
|
{
|
|
40
|
+ ObjectInputStream in;
|
40
|
41
|
boolean exit = false;
|
41
|
42
|
while(!exit)
|
42
|
43
|
{
|
43
|
44
|
try
|
44
|
45
|
{
|
45
|
|
- ObjectInputStream in = new ObjectInputStream(socket.getInputStream());
|
|
46
|
+ in = new ObjectInputStream(socket.getInputStream());
|
46
|
47
|
Notification notif = (Notification) in.readObject();
|
47
|
48
|
|
48
|
49
|
if(!(notif.getAuthor().equals(user)) && !(notif.getAuthor().isOutdoor() && !isOutdoor))
|
|
@@ -140,6 +141,7 @@ class ReceiveThread extends Thread {
|
140
|
141
|
}
|
141
|
142
|
catch(Exception e)
|
142
|
143
|
{
|
|
144
|
+ in.reset();
|
143
|
145
|
e.printStackTrace();
|
144
|
146
|
/*System.out.println("Socket closed");
|
145
|
147
|
dest_sockets.remove(socket);
|