shayhatsor / zookeeper

Apache ZooKeeper .NET async Client
https://nuget.org/packages/ZooKeeperNetEx/
Apache License 2.0
236 stars 53 forks source link

System.ArgumentNullException #3

Closed nj4x closed 8 years ago

nj4x commented 8 years ago

Hit this exception when using WriteLock without LockListener callback:

Location: org.apache.zookeeper.recipes.lock.WriteLock.LockZooKeeperOperation

Reason: writeLock.callback is null

                                lock (writeLock.callback) {
                                    if (writeLock.callback != null) {
                                        writeLock.callback.lockAcquired();
                                    }
                                }
shayhatsor commented 8 years ago

nice catch, the recipes library is much less mature then the main zookeeper one. my tests are imported from java, i guess this scenario wasn't covered as it is a bug introduced by me. i've made a fix and released a new nuget. (3.4.7.3)

nj4x commented 8 years ago

Great! Thank you, Shay.