ing
This commit is contained in:
parent
3ed8b99ddd
commit
cc4927b692
|
@ -120,6 +120,8 @@ func (s *rpcServlet) Context() ServletContext {
|
||||||
func handleServlet(s *rpcServlet) {
|
func handleServlet(s *rpcServlet) {
|
||||||
var err error
|
var err error
|
||||||
|
|
||||||
|
logging.Logger().Info(fmt.Sprintf("Servlet is started"))
|
||||||
|
|
||||||
defer func() {
|
defer func() {
|
||||||
s.doneChan <- err
|
s.doneChan <- err
|
||||||
s.stopWg.Done()
|
s.stopWg.Done()
|
||||||
|
@ -152,8 +154,12 @@ func handleServlet(s *rpcServlet) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func handleReader(s *rpcServlet, stopChan chan struct{}, doneChan chan error) {
|
func handleReader(s *rpcServlet, stopChan chan struct{}, doneChan chan error) {
|
||||||
|
logging.Logger().Debug(fmt.Sprintf("reader of Servlet is started"))
|
||||||
|
|
||||||
var err error
|
var err error
|
||||||
defer func() {
|
defer func() {
|
||||||
|
logging.Logger().Debug(fmt.Sprintf("reader of Servlet is stopped"))
|
||||||
|
|
||||||
if r := recover(); r != nil {
|
if r := recover(); r != nil {
|
||||||
if err == nil {
|
if err == nil {
|
||||||
err = fmt.Errorf("RPC Server: Panic when reading request from client: %v", r)
|
err = fmt.Errorf("RPC Server: Panic when reading request from client: %v", r)
|
||||||
|
@ -191,8 +197,11 @@ func handleReader(s *rpcServlet, stopChan chan struct{}, doneChan chan error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func handleWriter(s *rpcServlet, stopChan chan struct{}, doneChan chan error) {
|
func handleWriter(s *rpcServlet, stopChan chan struct{}, doneChan chan error) {
|
||||||
|
logging.Logger().Debug(fmt.Sprintf("writer of Servlet is started"))
|
||||||
|
|
||||||
var err error
|
var err error
|
||||||
defer func() {
|
defer func() {
|
||||||
|
logging.Logger().Debug(fmt.Sprintf("writer of Servlet is stopped"))
|
||||||
if r := recover(); r != nil {
|
if r := recover(); r != nil {
|
||||||
if err == nil {
|
if err == nil {
|
||||||
err = fmt.Errorf("RPC Server: Panic when writing response to client: %v", r)
|
err = fmt.Errorf("RPC Server: Panic when writing response to client: %v", r)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user