Skip to content

Commit

Permalink
Issue GsDevKit#60: crank HTTP socket timeouts down to 500 ms
Browse files Browse the repository at this point in the history
  • Loading branch information
Dale Henrichs committed Mar 22, 2015
1 parent 763cd79 commit 7eb9b11
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ getResponseUpTo: markerString
tester := 1 max: response position. "OK if mm in the middle"
(response position < buf size) & (self isActive | self readyForRead)
& ((tries := tries - 1) >= 0) ] whileTrue: [
(self waitForReadDataUpToMs: 120000) ifFalse: [
(self waitForReadDataUpToMs: 500) ifFalse: [
self error: 'data was late'].
bytesRead := self readInto: buf startingAt: 1 for: buf size.
response nextPutAll: (buf copyFrom: 1 to: bytesRead)].

^ Array with: response contents asString
with: ''
with: '' "Marker not found and connection closed"
with: '' "Marker not found and connection closed"
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ getResponseUpTo: markerString ignoring: ignoreString
with: (buf asString copyFrom: tt+1 to: response position - 1)]].
tester _ 1 max: response position. "OK if mm in the middle"
(response position < buf size) & (self isActive | self readyForRead)] whileTrue: [
(self waitForReadDataUpToMs: 120000) ifFalse: [
(self waitForReadDataUpToMs: 500) ifFalse: [
self error: 'data was late'].
bytesRead _ self readInto: buf startingAt: 1 for: buf size.
response nextPutAll: (buf copyFrom: 1 to: bytesRead)].

^ Array with: response contents asString
with: ''
with: '' "Marker not found and connection closed"
with: '' "Marker not found and connection closed"

0 comments on commit 7eb9b11

Please sign in to comment.