repo: don't fetch changes when we're busy adding files
This commit is contained in:
parent
ef89629e7c
commit
4131958a0e
|
@ -239,13 +239,15 @@ namespace SparkleLib {
|
||||||
|
|
||||||
// Fetch changes when there is a message in the irc channel
|
// Fetch changes when there is a message in the irc channel
|
||||||
Listener.Client.OnChannelMessage += delegate (object o, IrcEventArgs args) {
|
Listener.Client.OnChannelMessage += delegate (object o, IrcEventArgs args) {
|
||||||
SparkleHelpers.DebugInfo ("Irc", "[" + Name + "] Was notified of a remote change.");
|
SparkleHelpers.DebugInfo ("Irc", "[" + Name + "] Was notified of a remote change...");
|
||||||
string message = args.Data.Message.Trim ();
|
string message = args.Data.Message.Trim ();
|
||||||
|
|
||||||
if (!message.Equals (_CurrentHash) && message.Length == 40) {
|
if (!message.Equals (_CurrentHash) && message.Length == 40) {
|
||||||
FetchQueue++;
|
FetchQueue++;
|
||||||
|
|
||||||
if (!_IsFetching) {
|
if (_IsBuffering) {
|
||||||
|
SparkleHelpers.DebugInfo ("Irc", "[" + Name + "] ...but we're busy adding files. We'll fetch them later.");
|
||||||
|
} else if (!_IsFetching) {
|
||||||
while (FetchQueue > 0) {
|
while (FetchQueue > 0) {
|
||||||
Fetch ();
|
Fetch ();
|
||||||
FetchQueue--;
|
FetchQueue--;
|
||||||
|
|
Loading…
Reference in a new issue