bruth commented on issue #1764: WIP - Pulsar Go client library
URL: https://github.com/apache/incubator-pulsar/pull/1764#issuecomment-392879817
 
 
   @merlimat Just ran into this using the reader example.
   
   ```
   panic: interface conversion: interface {} is nil, not *pulsar.readerCallback
   
   goroutine 17 [running, locked to thread]:
   
github.com/apache/incubator-pulsar/pulsar-client-go/pulsar.pulsarReaderListenerProxy(0x7000004158f8,
 0x4c00b30, 0x482a630)
        
/Users/ruthb/Code/go/src/github.com/apache/incubator-pulsar/pulsar-client-go/pulsar/c_reader.go:124
 +0xd7
   
github.com/apache/incubator-pulsar/pulsar-client-go/pulsar._cgoexpwrap_07f19b7e46c2_pulsarReaderListenerProxy(0x7000004158f8,
 0x4c00b30, 0x482a630)
        _cgo_gotypes.go:1579 +0x3f
   ```
   
   It looks like the code assumes a `*readerCallback` will be set and this does 
not use the assertion check:
   
   ```go
   rc, ok := restorePointer(ctx).(*readerCallback)
   if ok {
     rc.channel <- ReaderMessage{rc.reader, newMessageWrapper(message)}
   }
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to