Skip to content

Commit 0a6c4d4

Browse files
Fix error on stop bridge when an error is being handled.
1 parent 52b3588 commit 0a6c4d4

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

src/PythonBridge-Pharo/PBMsgPackPharoBroker.class.st

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ PBMsgPackPharoBroker class >> serializerClass [
2222

2323
{ #category : #private }
2424
PBMsgPackPharoBroker >> _primHandle: dict [
25-
^ [ self primHandle: dict ] ifCurtailed: [ ^ self ]
25+
"Remove ifCurtailed: [ ^ self ]"
26+
^ self primHandle: dict
2627
]
2728

2829
{ #category : #private }
@@ -128,14 +129,15 @@ PBMsgPackPharoBroker >> start [
128129
msgStream := PBMsgPackSocketStream on: (SocketStream on: bindSocket).
129130
[ [ true ] whileTrue: [
130131
self _primHandle: msgStream next ] ]
131-
on: ConnectionClosed
132-
do: [ :err | "Do nothing." ] ] ] forkAt: Processor lowIOPriority.
132+
on: Error
133+
do: [ :err | PBPlatform current uiManager notify: err printString ] ]
134+
] forkAt: Processor lowIOPriority.
133135
self preventTestForkedPDestroyServer
134136
]
135137

136138
{ #category : #'start-stop' }
137139
PBMsgPackPharoBroker >> stop [
138-
handlerThread ifNotNil: [ handlerThread terminate ].
139140
msgStream ifNotNil: [ msgStream close ].
140-
serverSocket ifNotNil: [ serverSocket closeAndDestroy ]
141+
serverSocket ifNotNil: [ serverSocket closeAndDestroy ].
142+
handlerThread ifNotNil: [ handlerThread terminate ].
141143
]

src/PythonBridge-Pharo/PBPharoUiManager.class.st

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ Class {
66

77
{ #category : #'as yet unclassified' }
88
PBPharoUiManager >> notify: aString [
9-
Warning signal: aString
9+
Transcript show: aString asString.
10+
super notify: aString asString.
1011
]
1112

1213
{ #category : #hooks }

0 commit comments

Comments
 (0)