Alexander Brakowski 9 years ago
parent
commit
277e198e9c

+ 9 - 0
src/de/tudarmstadt/informatik/hostage/sync/p2p/P2PSyncActivity.java

@@ -406,6 +406,8 @@ public class P2PSyncActivity extends Activity implements WifiP2pManager.GroupInf
 
                 oos.writeObject(thisSyncInfo);
                 oos.flush();
+                oos.reset();
+
                 publishProgress(3);
 
                 // --- 2. read sync data
@@ -424,6 +426,8 @@ public class P2PSyncActivity extends Activity implements WifiP2pManager.GroupInf
 
                 oos.writeObject(mySyncData);
                 oos.flush();
+                oos.reset();
+
                 publishProgress(5);
 
                 // --- 4. We are done!
@@ -506,6 +510,7 @@ public class P2PSyncActivity extends Activity implements WifiP2pManager.GroupInf
 
                 oos.writeObject(thisSyncInfo);
                 oos.flush();
+                oos.reset();
 
                 publishProgress(2);
 
@@ -525,6 +530,10 @@ public class P2PSyncActivity extends Activity implements WifiP2pManager.GroupInf
                 //thisSyncData.records.add(new Record());
                 oos.writeObject(thisSyncData);
                 oos.flush();
+                oos.reset();
+
+
+
                 publishProgress(4);
 
                 // --- 3. Receive sync data