storj/pkg/server
Jeff Wendling 007662d49e pkg/server: serve drpc listeners along with grpc
The fundamental problem is that both drpc and grpc servers
want to close the listener and they both want to ignore the
error from Accept after the listener is closed. There's no
way to do this in a race free way. Fortunately, the mux
hands out listeners that can be independently closed. That
means they can both do their own shutdown logic where they
ignore the error, and then after they're closed, the code
orchestrating the servers can close the listeners.

The final weird bit is that the server's Close method is
required to wait until the Run method has exited (or at
least enough for the listeners to definitely be closed)
because tests depend on that behavior, so we have to add
some channels/mutexes/onces to ensure that Run has exited
and that a new call can't start after Close is called.

Change-Id: I7c4ef293f7963f83138815f51824fd5b8d09ce15
2019-09-12 19:18:30 +00:00
..
common.go pkg: Align errs Class messages (#2485) 2019-07-08 17:37:12 -04:00
config.go pkg/revocation: ensure we close revocation databases (#2825) 2019-08-20 18:04:17 +03:00
interceptors.go pkg/server: Don't use Sugared logger (#2935) 2019-09-03 11:39:26 +02:00
server.go pkg/server: serve drpc listeners along with grpc 2019-09-12 19:18:30 +00:00