GSM: Make sure the caller of serve is always notified. provide isConnected
This commit is contained in:
parent
fe9d459ff9
commit
421ac8dd46
14
TestPhone.st
14
TestPhone.st
|
@ -88,12 +88,20 @@ Object subclass: IPAConfig [
|
|||
|
||||
serve [
|
||||
[
|
||||
connection serve.
|
||||
'Connection disconnected' printNl.
|
||||
sem signal.
|
||||
[
|
||||
connection serve.
|
||||
'Connection disconnected' printNl.
|
||||
] ensure: [
|
||||
connection := nil.
|
||||
sem signal.
|
||||
]
|
||||
] fork.
|
||||
]
|
||||
|
||||
isConnected [
|
||||
^ connection isNil not
|
||||
]
|
||||
|
||||
semaphore [ ^ sem ]
|
||||
|
||||
sendLU: aPhone [
|
||||
|
|
Reference in New Issue