diff --git a/server/server_handlers.go b/server/server_handlers.go index 1299ab8..18a7762 100644 --- a/server/server_handlers.go +++ b/server/server_handlers.go @@ -67,7 +67,7 @@ func (sh *ServerHandlers) Validate() { sh.ServerHandlers.Validate() if "" == sh.pidPath { - logging.Logger().Panic(fmt.Sprintf("Server: The path of pid file must be specified")) + logging.Logger().Panicf("Server: The path of pid file must be specified") } } diff --git a/server/socket_handlers.go b/server/socket_handlers.go index cf9e51a..da68621 100644 --- a/server/socket_handlers.go +++ b/server/socket_handlers.go @@ -66,6 +66,7 @@ func (sh *SocketHandlers) Handle(soc server.Socket, stopChan <-chan struct{}, do select { case err = <-rpcDoneChan: + case <-stopChan: rpcServlet.Stop() <-rpcDoneChan