diff --git a/ActiveSync/SOGoActiveSyncDispatcher.m b/ActiveSync/SOGoActiveSyncDispatcher.m
index 17599ae..091efc6 100644
--- a/ActiveSync/SOGoActiveSyncDispatcher.m
+++ b/ActiveSync/SOGoActiveSyncDispatcher.m
@@ -2164,7 +2164,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 - (void) processPing: (id <DOMElement>) theDocumentElement
           inResponse: (WOResponse *) theResponse
 {
-  NSString *collectionId, *realCollectionId, *syncKey;
+  NSString *collectionId, *realCollectionId, *syncKey, *key, *processIdentifier;
   NSMutableArray *foldersWithChanges, *allFoldersID;
   SOGoMicrosoftActiveSyncFolderType folderType;
   NSMutableDictionary *folderMetadata;
@@ -2177,8 +2177,13 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
   NSData *d;
   NSAutoreleasePool *pool;
 
-  int i, j, heartbeatInterval, defaultInterval, internalInterval, status;
+  int i, j, heartbeatInterval, defaultInterval, internalInterval, status, total_sleep;
   
+  // Let other ping requests know that a new request has arrived.
+  processIdentifier = [NSString stringWithFormat: @"%d", [[NSProcessInfo processInfo] processIdentifier]];
+  key = [NSString stringWithFormat: @"%@+%@", [[context activeUser] login], [context objectForKey: @"DeviceType"]];
+  [[SOGoCache sharedCache] setValue: processIdentifier forKey: key];
+
   defaults = [SOGoSystemDefaults sharedSystemDefaults];
   defaultInterval = [defaults maximumPingInterval];
   internalInterval = [defaults internalSyncInterval];
@@ -2272,8 +2277,29 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
         }
       else
         {
-          [self logWithFormat: @"Sleeping %d seconds while detecting changes in Ping...", internalInterval];
-          sleep(internalInterval);
+          total_sleep = 0;
+
+          while (total_sleep < internalInterval)
+            {
+              // We check if we must break the current ping request since an other ping request
+              // has just arrived.
+              if ([[SOGoCache sharedCache] valueForKey: key] && ![[[SOGoCache sharedCache] valueForKey: key] isEqualToString: processIdentifier])
+                {
+                  if (debugOn)
+                    [self logWithFormat: @"EAS - Ping request canceled (%@)", [[SOGoCache sharedCache] valueForKey: key]];
+
+                  // Make sure we end the heardbeat-loop.
+                  heartbeatInterval = internalInterval = 1;
+
+                  break;
+                }
+              else
+                {
+                  [self logWithFormat: @"Sleeping %d seconds while detecting changes in Ping...", internalInterval-total_sleep];
+                  sleep(5);
+                  total_sleep += 5;
+                }
+            }
         }
     }
   
