Cleaner PONG

FossilOrigin-Name: aa89dd371b37464a34e19a8b50e5cf9c63362ba9db7a1322c1a3453b34a37e2b
This commit is contained in:
Jonathan Schleifer 2016-05-07 11:23:49 +00:00
parent 533177729a
commit 90f49ba82a

View file

@ -232,8 +232,8 @@
if ([components count] == 2 && if ([components count] == 2 &&
[[components firstObject] isEqual: @"PING"]) { [[components firstObject] isEqual: @"PING"]) {
OFMutableString *s = [[line mutableCopy] autorelease]; OFMutableString *s = [[line mutableCopy] autorelease];
[s replaceOccurrencesOfString: @"PING" [s replaceCharactersInRange: of_range(0, 4)
withString: @"PONG"]; withString: @"PONG"];
[self sendLine: s]; [self sendLine: s];
return; return;