Skip to content

Conversation

gsoltis
Copy link

@gsoltis gsoltis commented Jan 2, 2018

Add log line to log pending writes remaining when the network is disabled. Requested by API review.


- (void)cleanUpWriteStreamState {
self.lastBatchSeen = kFSTBatchIDUnknown;
FSTLog(@"Stopping write stream with %i pending writes", [self.pendingWrites count]);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be producing a warning. Please make sure your setup is showing it to you.

self.pendingWrites is an NSMutableArray which means count is an NSUInteger, which isn't suitable for direct use with printf format strings.

I think this means the format should be %lu and you need to cast to unsigned long before using it. A comparable usage within the code would be

(unsigned long)self.mutations.count,

Copy link
Contributor

@wilhuff wilhuff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use the correct format and then this LGTM

Copy link
Contributor

@wilhuff wilhuff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@gsoltis gsoltis merged commit 275b4e5 into firestore-api-changes Jan 2, 2018
minafarid pushed a commit to minafarid/firebase-ios-sdk that referenced this pull request Jun 6, 2018
* Log pending writes when we disable the network

* Fix formatting

* Formatting
@paulb777 paulb777 deleted the log_pending_writes branch May 26, 2019 20:46
@firebase firebase locked and limited conversation to collaborators Nov 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants