hi Qi,

is it supported? i tried using ctx.Done() for this purpose, but found that 
this channel close is limited to one operation invocation. so cannot use it.

Is there some channel i can listen to at the Transport level? 

I found below code in google.golang.org/grpc/server.go
will the print statement in line 420 be printed when one connection closes?

411 func (s *Server) serveStreams(st transport.ServerTransport) {
412     defer s.removeConn(st)
413     defer st.Close()
414     var wg sync.WaitGroup
415     st.HandleStreams(func(stream *transport.Stream) {
416         wg.Add(1)
417         go func() {
418             defer wg.Done()
419             s.handleStream(st, stream, s.traceInfo(st, stream))
420             fmt.Printf("grpc/server.go:Server.serverStream.$handleStream 
finished")
421         }()
422     })
423     wg.Wait()
424 }


can some notification be generated from this method.

497 func (s *Server) removeConn(c io.Closer) {
498     s.mu.Lock()
499     defer s.mu.Unlock()
500     if s.conns != nil {
501         delete(s.conns, c)
502         s.cv.Signal()
503     }
504 }



thanks,
Regards,
Vimal


-- 
You received this message because you are subscribed to the Google Groups 
"grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/grpc-io.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/grpc-io/deaab0a5-9851-4c45-9c60-153278d86278%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to