Skip to content

Commit

Permalink
[feenkcom/gtoolkit#4108] Update the default session label to show tha…
Browse files Browse the repository at this point in the history
…t the default session has been removed.
  • Loading branch information
akgrant43 committed Oct 18, 2024
1 parent 21c41f3 commit 9c9bff6
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -355,14 +355,17 @@ GtGemStoneSessionRegistry >> defaultConnectorName [
GtGemStoneSessionRegistry >> defaultSession [

^ defaultSession ifNil:
[ defaultSession := self
[ | newSession |
newSession := self
sessionWithConnectorNamed: 'default'
ifAbsent:
[ self
connectorNamed: 'default'
ifPresent: [ :connector |
self newSessionWithConnectorNamed: 'default' ]
ifAbsent: [ nil ] ] ].
ifAbsent: [ nil ] ].
newSession ifNotNil: [ self defaultSession: newSession ].
newSession ].
]

{ #category : #accessing }
Expand Down Expand Up @@ -873,7 +876,7 @@ GtGemStoneSessionRegistry >> removeSession: aGtGemStoneSession [
[ defaultSession ifNotNil:
[ aGtGemStoneSession name = defaultSession name ifTrue:
[ self assert: aGtGemStoneSession = defaultSession.
defaultSession := nil ] ].
self defaultSession: nil ] ].
sessions
removeKey: aGtGemStoneSession name
ifAbsent: [ ^ self ] ].
Expand Down

0 comments on commit 9c9bff6

Please sign in to comment.