feat: rewrite bus to prevent deadlocks
This commit is contained in:
@ -45,12 +45,12 @@ func (s *Service) NewBlobReader(ctx context.Context, args *NewBlobReaderArgs, re
|
||||
func (s *Service) getOpenedReader(id ReaderID) (io.ReadSeekCloser, error) {
|
||||
raw, exists := s.readers.Load(id)
|
||||
if !exists {
|
||||
return nil, errors.Errorf("could not find writer '%s'", id)
|
||||
return nil, errors.Errorf("could not find reader '%s'", id)
|
||||
}
|
||||
|
||||
reader, ok := raw.(io.ReadSeekCloser)
|
||||
if !ok {
|
||||
return nil, errors.Errorf("unexpected type '%T' for writer", raw)
|
||||
return nil, errors.Errorf("unexpected type '%T' for reader", raw)
|
||||
}
|
||||
|
||||
return reader, nil
|
||||
|
Reference in New Issue
Block a user