File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -1731,18 +1731,21 @@ Socket >> waitForSendDoneFor: timeout ifClosed: closedBlock ifTimedOut: timedOut
1731
1731
" Wait up until the given deadline for the current send operation to complete.
1732
1732
If it does not, execute <timedOutBlock>. If the connection is closed before
1733
1733
the send completes, execute <closedBlock>."
1734
- | startTime msecsDelta msecsElapsed sendDone |
1735
-
1734
+
1735
+ | startTime msecsDelta msecsElapsed |
1736
1736
startTime := Time millisecondClockValue.
1737
1737
msecsDelta := (timeout * 1000 ) truncated.
1738
1738
" Connection end and final data can happen fast, so test in this order"
1739
- [ sendDone := self sendDone ] whileFalse: [
1739
+ [ self sendDone ] whileFalse: [
1740
1740
self isConnected ifFalse: [ ^ closedBlock value ].
1741
1741
(msecsElapsed := Time millisecondsSince: startTime) < msecsDelta
1742
1742
ifFalse: [ ^ timedOutBlock value ].
1743
1743
writeSemaphore waitTimeoutMilliseconds: msecsDelta - msecsElapsed ].
1744
-
1745
- ^ sendDone
1744
+
1745
+ " For backward compatibility with Pharo <= 11, return a boolean indicating
1746
+ whether the send is completed. The loop will only terminate when this
1747
+ is the case, so simply return true."
1748
+ ^ true
1746
1749
]
1747
1750
1748
1751
{ #category : ' accessing' }
You can’t perform that action at this time.
0 commit comments