mirror of
https://github.com/go-micro/go-micro.git
synced 2025-08-10 21:52:01 +02:00
Temporary stop gap for panicking server handlers
This commit is contained in:
@@ -53,7 +53,11 @@ func (s *rpcServer) accept(sock transport.Socket) {
|
||||
delete(hdr, "Content-Type")
|
||||
|
||||
ctx := c.WithMetadata(context.Background(), hdr)
|
||||
s.rpc.ServeRequestWithContext(ctx, codec)
|
||||
// TODO: needs better error handling
|
||||
if err := s.rpc.ServeRequestWithContext(ctx, codec); err != nil {
|
||||
log.Errorf("Unexpected error servinc request, closing socket: %v", err)
|
||||
sock.Close()
|
||||
}
|
||||
}
|
||||
|
||||
func (s *rpcServer) Config() options {
|
||||
|
Reference in New Issue
Block a user