Browse files

Make change tracker work with URLs without an explicit port

Use port 80 if _databaseURL.port is 0 (unspecified).
I have no idea why I have to keep making this fix over and over! Somehow it didn't make it into this branch of this class...

Change-Id: I109fa014c09bd2bc0bc51f549a53c2227f0d1ab0
  • Loading branch information...
1 parent 863d676 commit 9a3ada3a409dcc8020a725bc632b5033f71abc7b @snej snej committed Apr 11, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 Couch/CouchSocketChangeTracker.m
@@ -61,7 +61,7 @@ - (BOOL) start {
_trackingOutput = (NSOutputStream*)cfOutputStream;
[NSStream getStreamsToHost: [NSHost hostWithName:]
- port: _databaseURL.port.intValue
+ port: _databaseURL.port.intValue ?: 80
inputStream: &_trackingInput outputStream: &_trackingOutput];
if (!_trackingOutput)
return NO;

0 comments on commit 9a3ada3

Please sign in to comment.