Merge remote-tracking branch 'PierreAronnax/windows' into windows
This commit is contained in:
commit
b1d460cd40
|
@ -148,7 +148,7 @@ namespace SparkleLib {
|
||||||
|
|
||||||
public bool HasQueueDownAnnouncement (string folder_identifier)
|
public bool HasQueueDownAnnouncement (string folder_identifier)
|
||||||
{
|
{
|
||||||
foreach (SparkleAnnouncement announcement in this.queue_down) {
|
foreach (SparkleAnnouncement announcement in this.queue_down.GetRange(0, this.queue_down.Count)) {
|
||||||
if (announcement.FolderIdentifier.Equals (folder_identifier)) {
|
if (announcement.FolderIdentifier.Equals (folder_identifier)) {
|
||||||
this.queue_down.Remove (announcement);
|
this.queue_down.Remove (announcement);
|
||||||
return true;
|
return true;
|
||||||
|
@ -174,9 +174,9 @@ namespace SparkleLib {
|
||||||
Connected ();
|
Connected ();
|
||||||
|
|
||||||
if (this.queue_up.Count > 0) {
|
if (this.queue_up.Count > 0) {
|
||||||
SparkleHelpers.DebugInfo ("Listener", "Delivering queued messages...");
|
SparkleHelpers.DebugInfo ("Listener", "Delivering " + this.queue_up.Count + " queued messages...");
|
||||||
|
|
||||||
foreach (SparkleAnnouncement announcement in this.queue_up) {
|
foreach (SparkleAnnouncement announcement in this.queue_up.GetRange(0, this.queue_up.Count)) {
|
||||||
AnnounceBase (announcement);
|
AnnounceBase (announcement);
|
||||||
this.queue_up.Remove (announcement);
|
this.queue_up.Remove (announcement);
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,7 +39,6 @@ namespace SparkleLib {
|
||||||
base (server, folder_identifier)
|
base (server, folder_identifier)
|
||||||
{
|
{
|
||||||
base.channels.Add (folder_identifier);
|
base.channels.Add (folder_identifier);
|
||||||
this.socket = new Socket (AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
|
|
||||||
this.connected = false;
|
this.connected = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -70,9 +69,11 @@ namespace SparkleLib {
|
||||||
// Connect and subscribe to the channel
|
// Connect and subscribe to the channel
|
||||||
int port = Server.Port;
|
int port = Server.Port;
|
||||||
if (port < 0) port = 9999;
|
if (port < 0) port = 9999;
|
||||||
this.socket.Connect (Server.Host, port);
|
|
||||||
|
|
||||||
lock (this.mutex) {
|
lock (this.mutex) {
|
||||||
|
this.socket = new Socket (AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
|
||||||
|
this.socket.Connect (Server.Host, port);
|
||||||
|
|
||||||
base.is_connecting = false;
|
base.is_connecting = false;
|
||||||
this.connected = true;
|
this.connected = true;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue