NSLogger icon indicating copy to clipboard operation
NSLogger copied to clipboard

Calling LoggerSetViewerHost prior to worker thread being started prevents Bonjour from starting

Open c0diq opened this issue 9 years ago • 1 comments

If you have Bonjour enabled but also sets a host:port before the worker thread has actually started, because logger->remoteOptionsChangedSource is not set yet, the LoggerRemoteSettingsChanged is not called and thus LoggerStartBonjourBrowsing is not called.

Instead when the worker thread starts, the reachability is installed and its callback LoggerReachabilityCallBack will call LoggerTryConnect. However it does not start Bonjour first like LoggerRemoteSettingsChanged does. Instead it tries to connect to the host. Unfortunately if the host is not reachable (different domain than current), LoggerWriteStreamTerminated is eventually called which then tries to reconnect by calling LoggerTryConnect. But Bonjour is never started and LoggerStartBonjourBrowsing is never called.

c0diq avatar Jun 07 '16 05:06 c0diq

It is possible that #219 have fixed this issue.

0xced avatar May 01 '17 15:05 0xced