Hi Eric

Seems a bug on session management, i've created an issue here

https://github.com/orientechnologies/orientjs/issues/279

2017-10-03 16:56 GMT+02:00 Enrico Risa <enrico.r...@gmail.com>:

> Hi Eric
>
> let me check on this
>
> 2017-10-03 14:46 GMT+02:00 Eric24 <e...@24x8.com>:
>
>> Can anyone answer this question?
>> https://stackoverflow.com/questions/46536616/not-possible-to
>> -use-server-after-db-server-use
>>
>> PS - I'm not sure what the comment about opening a github request is all
>> about--I'm asking a question, not requesting a feature.
>>
>>
>> Here's the referenced code:
>>
>> "use strict";
>>
>>
>> const util = require('util');
>> const OrientDB = require('orientjs');
>>
>>
>> console.log('opening server');
>> var server = OrientDB({
>>   host: '172.30.1.15',
>>   port: 2424,
>>   username: 'root',
>>   password: 'ecdl3235'
>> });
>>
>>
>> console.log('opening db');
>> var db = server.use({
>>   name: 'GratefulDeadConcerts',
>>   username: 'admin',
>>   password: 'admin'
>> });
>> console.log('using database: ' + db.name);
>>
>>
>> // this fails (hangs forever) if the server.use above is included, but
>> works if it's commented out
>> console.log('server.list');
>> server.list()
>> .then(function(dbs) {
>>   console.log(`Database count: ${dbs.length}`);
>>   console.log(util.inspect(dbs));
>> }).error(function(error) {
>>
>>   console.log('Error: ' + error);
>> }).catch(function(error) {
>>
>>   console.log('Exception: ' + error);
>> });
>>
>>
>>
>> // application shutdown handler
>> process.on('SIGINT', function () {
>>   console.log('SIGINT');
>>
>>   console.log('closing db');
>>   db.close()
>>   .then(function() {
>>     console.log('closing server');
>>     server.close();
>>     console.log('exiting');
>>     process.exit(0);
>>   });
>> });
>>
>>
>>
>> --
>>
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "OrientDB" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to orient-database+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to orient-database+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to