msemys / esjc

EventStore Java Client
MIT License
108 stars 27 forks source link

Dangeling Threads after disconnect() #15

Closed uweschaefer closed 7 years ago

uweschaefer commented 7 years ago

There are some leftover Threads running that prevent VM Termination after use. Easy to reproduce:

EventStore eventstore = EventStoreBuilder.newBuilder().singleNodeAddress("127.0.0.1", 1113)
                .userCredentials("admin", "changeit").build();
eventstore.connect();

Thread.sleep(10000);

eventstore.disconnect();
msemys commented 7 years ago

added new method EventStore.shutdown() that disconnects client and initiates executor services shutdown

uweschaefer commented 7 years ago

thanks!