Skip to content

Commit d148412

Browse files
committed
Detroy the driver when running :server disconnect
1 parent d41417a commit d148412

File tree

4 files changed

+8
-0
lines changed

4 files changed

+8
-0
lines changed

app/scripts/services/Auth.coffee

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ angular.module('neo4jApp.services')
117117
if @getCurrentUser()
118118
clearConnectionAuthData()
119119
ConnectionStatusService.setConnected no
120+
ProtocolFactory.getAuthService().clearConnection()
120121

121122
setNewPassword: (old_passwd, new_passwd) ->
122123
that = @

app/scripts/services/Bolt.coffee

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,10 @@ angular.module('neo4jApp.services')
8888
)
8989
q.promise
9090

91+
clearConnection = ->
92+
_driver.close() if _driver?
93+
_driver = null
94+
9195
createSession = () ->
9296
return _driver.session() if _driver
9397
return no
@@ -394,5 +398,6 @@ angular.module('neo4jApp.services')
394398
schemaResultToRESTResult indexes, constraints
395399
constructJmxResult: jmxResultToRESTResult
396400
constructVersionResult: versionResultToRESTResult
401+
clearConnection: clearConnection
397402
}
398403
]

app/scripts/services/UtilityBolt.coffee

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ angular.module('neo4jApp.services')
2727
'$q'
2828
(Bolt, Settings, $q) ->
2929
{
30+
clearConnection: -> Bolt.clearConnection()
3031
getSchema: ->
3132
q = $q.defer()
3233
$q.all([

app/scripts/services/UtilityREST.coffee

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ angular.module('neo4jApp.services')
2727
'$q'
2828
(Server, Settings, $q) ->
2929
{
30+
clearConnection: -> angular.noop
3031
getJmx: (whatToGet = []) ->
3132
Server.jmx(whatToGet)
3233

0 commit comments

Comments
 (0)