mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2025-12-20 17:16:46 +00:00
GODT-1672: implemented bug report feature.
WIP: EventStream grpcClient call now include 'clientPlaftorm' info. Fix: removed unnecessary call to useragent.SetPlatform().
This commit is contained in:
@ -27,13 +27,15 @@ import (
|
||||
)
|
||||
|
||||
// StartEventStream implement the gRPC server->Client event stream.
|
||||
func (s *Service) StartEventStream(_ *emptypb.Empty, server Bridge_StartEventStreamServer) error {
|
||||
func (s *Service) StartEventStream(request *EventStreamRequest, server Bridge_StartEventStreamServer) error {
|
||||
s.log.Info("Starting Event stream")
|
||||
|
||||
if s.eventStreamCh != nil {
|
||||
return status.Errorf(codes.AlreadyExists, "the service is already streaming") // TO-DO GODT-1667 decide if we want to kill the existing stream.
|
||||
}
|
||||
|
||||
s.userAgent.SetPlatform(request.ClientPlatform)
|
||||
|
||||
s.eventStreamCh = make(chan *StreamEvent)
|
||||
s.eventStreamDoneCh = make(chan struct{})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user