Merge "ref: Update and enhance several comments related to the new server API."
diff --git a/runtime/internal/rpc/server.go b/runtime/internal/rpc/server.go
index f93c7f4..6682bcb 100644
--- a/runtime/internal/rpc/server.go
+++ b/runtime/internal/rpc/server.go
@@ -151,7 +151,7 @@
}
externalStates = map[serverState]rpc.ServerState{
- initialized: rpc.ServerInit,
+ initialized: rpc.ServerActive,
listening: rpc.ServerActive,
serving: rpc.ServerActive,
publishing: rpc.ServerActive,
diff --git a/runtime/internal/rpc/server_test.go b/runtime/internal/rpc/server_test.go
index 7263415..3e8c3fc 100644
--- a/runtime/internal/rpc/server_test.go
+++ b/runtime/internal/rpc/server_test.go
@@ -154,7 +154,7 @@
defer server.Stop()
status := server.Status()
- if got, want := status.State, rpc.ServerInit; got != want {
+ if got, want := status.State, rpc.ServerActive; got != want {
t.Fatalf("got %s, want %s", got, want)
}
server.Listen(rpc.ListenSpec{Addrs: rpc.ListenAddrs{{"tcp", "127.0.0.1:0"}}})
@@ -260,7 +260,7 @@
}
}
- expectState(rpc.ServerInit)
+ expectState(rpc.ServerActive)
// Need to call Listen first.
err = server.Serve("", &testServer{}, nil)