My theory is that some error condition on the socket results in it
blocking for writes, which maybe also blocks reads... This separates the
two into separate services with their own socket, with restarts and
retries as appropriates on write timeouts and read/write errors. It
should be more robust, hopefully, but I have a hard time testing the
actual error conditions...
- Bug fix - use .Errorf() instead of .Error():
Before this change, an error message for failed tests in files/set_test.go
wrongly tried to use format strings in a call to .Error()
- Change event constants to be of type EventType rather than untyped integers.
- Slightly relax the locking for registry cache lookups:
For read access to Discover.registry we only need to take a read lock.
- Some cosmetic fixes.