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
17311731 " Wait up until the given deadline for the current send operation to complete.
17321732 If it does not, execute <timedOutBlock>. If the connection is closed before
17331733 the send completes, execute <closedBlock>."
1734- | startTime msecsDelta msecsElapsed sendDone |
1735-
1734+
1735+ | startTime msecsDelta msecsElapsed |
17361736 startTime := Time millisecondClockValue.
17371737 msecsDelta := (timeout * 1000 ) truncated.
17381738 " Connection end and final data can happen fast, so test in this order"
1739- [ sendDone := self sendDone ] whileFalse: [
1739+ [ self sendDone ] whileFalse: [
17401740 self isConnected ifFalse: [ ^ closedBlock value ].
17411741 (msecsElapsed := Time millisecondsSince: startTime) < msecsDelta
17421742 ifFalse: [ ^ timedOutBlock value ].
17431743 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
17461749]
17471750
17481751{ #category : ' accessing' }
You can’t perform that action at this time.
0 commit comments