8000 Close emitter connections in ObjC 4 & 5 · syk-coder/rabbitmq-tutorials@5d8200d · GitHub
[go: up one dir, main page]

Skip to content

Commit 5d8200d

Browse files
committed
Close emitter connections in ObjC 4 & 5
[#120637007]
1 parent 0247d67 commit 5d8200d

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

objective-c/tutorial4/tutorial4/ViewController.m

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ - (void)emitLogDirect:(NSString *)msg severity:(NSString *)severity {
4646

4747
[x publish:msg routingKey:severity];
4848
NSLog(@"Sent '%@'", msg);
49+
50+
[conn close];
4951
}
5052

5153
@end

objective-c/tutorial5/tutorial5/ViewController.m

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ - (void)emitLogTopic:(NSString *)msg routingKey:(NSString *)routingKey {
4646

4747
[x publish:msg routingKey:routingKey];
4848
NSLog(@"Sent '%@'", msg);
49+
50+
[conn close];
4951
}
5052

5153
@end

0 commit comments

Comments
 (0)
0