FIx: TCP Serialization Problem Adding outs.Reset on notify
This commit is contained in:
@@ -108,6 +108,7 @@ public class ClientHandler implements Runnable {
|
|||||||
*/
|
*/
|
||||||
public synchronized void notifyEvent(NetworkEvent event) {
|
public synchronized void notifyEvent(NetworkEvent event) {
|
||||||
try {
|
try {
|
||||||
|
out.reset();
|
||||||
out.writeObject(event);
|
out.writeObject(event);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
@@ -122,6 +123,7 @@ public class ClientHandler implements Runnable {
|
|||||||
*/
|
*/
|
||||||
public synchronized void notifyMiniModel(MiniModel game) {
|
public synchronized void notifyMiniModel(MiniModel game) {
|
||||||
try {
|
try {
|
||||||
|
out.reset();
|
||||||
out.writeObject(game);
|
out.writeObject(game);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
|||||||
Reference in New Issue
Block a user