fixup for latest micro
Some checks failed
coverage / build (push) Failing after 1m21s
test / test (push) Successful in 4m8s
sync / sync (push) Failing after 8s

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
2025-04-29 14:08:59 +03:00
parent 48906c5612
commit 823b2bdc52
4 changed files with 57 additions and 50 deletions

View File

@@ -230,11 +230,11 @@ func (g *Server) handler(srv interface{}, stream grpc.ServerStream) error {
var td string
// timeout for server deadline
if v, ok := md.Get("timeout"); ok && len(v) > 0 {
if v := md.Get("timeout"); v != nil {
md.Del("timeout")
td = v[0]
}
if v, ok := md.Get("grpc-timeout"); ok && len(v) > 0 {
if v := md.Get("grpc-timeout"); v != nil {
md.Del("grpc-timeout")
td = v[0][:len(v)-1]
switch v[0][len(v)-1:] {
@@ -256,7 +256,7 @@ func (g *Server) handler(srv interface{}, stream grpc.ServerStream) error {
// get content type
ct := DefaultContentType
if ctype, ok := md.Get("content-type"); ok && len(ctype) > 0 {
if ctype := md.Get("content-type"); ctype != nil {
ct = ctype[0]
}