Fix crashes with unavailable notification service

This commit is contained in:
Hylke Bons 2012-05-14 23:35:59 +01:00
parent 07eda17fa6
commit d149d9dce8
4 changed files with 9 additions and 12 deletions

1
NEWS
View file

@ -6,6 +6,7 @@
- Ship host keys of default plugins and verify on project add
- Don't touch the user's ~/.ssh/config to configure SSH
- Make fetching remote project's history optional
- Cached logs for faster event log loading/switching
0.8.4 for Linux, Mac and Windows (Sun Mar 18 2012)

View file

@ -68,8 +68,7 @@ namespace SparkleLib {
try {
lock (this.socket_lock) {
this.socket = new Socket (AddressFamily.InterNetwork,
SocketType.Stream, ProtocolType.Tcp) {
this.socket = new Socket (AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp) {
ReceiveTimeout = 5 * 1000,
SendTimeout = 5 * 1000
};
@ -164,7 +163,6 @@ namespace SparkleLib {
OnDisconnected ("Ping timeout");
return;
}
Thread.Sleep (1000);

View file

@ -175,9 +175,13 @@ namespace SparkleLib {
CreateInitialChangeSet ();
ChangeSets = GetChangeSets ();
CreateWatcher ();
CreateListener ();
new Thread (
new ThreadStart (delegate {
CreateListener ();
})
).Start ();
this.local_timer.Elapsed += delegate (object o, ElapsedEventArgs args) {
CheckForChanges ();
@ -223,8 +227,6 @@ namespace SparkleLib {
protected void OnConflictResolved ()
{
HasUnsyncedChanges = true; // ?
if (ConflictResolved != null)
ConflictResolved ();
}

View file

@ -641,11 +641,7 @@ namespace SparkleShare {
UpdateState ();
};
//lock (this.repo_lock) {
this.repositories.Add (repo);
//}
this.repositories.Add (repo);
repo.Initialize ();
}