Skip to content

Commit d8b7082

Browse files
committed
Issue #58: fixed{?) an accept problem whereby an accept error in SocketStreamSocket would lead to an infinite loop creating processes and then running out of memory ... Fix Rest test error ... only pass exceptions in debugMode for ZnServer
1 parent 48bd27c commit d8b7082

File tree

10 files changed

+23
-16
lines changed

10 files changed

+23
-16
lines changed
Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
as yet unclassified
22
accept: aTimeout
3-
"^an SpSocket
3+
"^an SpSocket
44
I accept the next connection made to the server socket I represent. I return a new
55
instance of SpSocket which represents the socket over which information can be
66
exchanged.
77
NOTE: this call will block waiting for an inbound connection"
88

9-
^SocketStreamSocket onNativeclientSocket: (self underlyingSocket accept: aTimeout) for: self
9+
| gsSocket |
10+
gsSocket := self underlyingSocket accept: aTimeout.
11+
gsSocket
12+
ifNil: [ NetworkError signal: 'accept error: ' , self underlyingSocket lastErrorString ].
13+
^ SocketStreamSocket onNativeclientSocket: gsSocket for: self
Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
as yet unclassified
22
accept
3-
"^an SpSocket
3+
"^an SpSocket
44
I accept the next connection made to the server socket I represent. I return a new
55
instance of SpSocket which represents the socket over which information can be
66
exchanged.
77
NOTE: this call will block waiting for an inbound connection"
88

9-
^SocketStreamSocket onNativeclientSocket: (self underlyingSocket accept) for: self
9+
| gsSocket |
10+
gsSocket := self underlyingSocket accept.
11+
gsSocket
12+
ifNil: [ NetworkError signal: 'accept error: ' , self underlyingSocket lastErrorString ].
13+
^ SocketStreamSocket onNativeclientSocket: gsSocket for: self

repository/SocketStream.package/SocketStreamSocket.class/methodProperties.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
"class" : {
33
"standardTimeout" : "PaulDeBruicker 04/12/2011 16:07" },
44
"instance" : {
5-
"accept" : "PaulDeBruicker 03/12/2011 12:00",
6-
"accept:" : "PaulDeBruicker 04/13/2011 11:24",
5+
"accept" : "dkh 12/04/2014 07:49",
6+
"accept:" : "dkh 12/04/2014 07:49",
77
"dataAvailable" : "PaulDeBruicker 04/08/2011 08:10",
88
"destroy" : "PaulDeBruicker 04/08/2011 18:29",
99
"isConnected" : "PaulDeBruicker 03/12/2011 11:07",

repository/SocketStream.package/monticello.meta/version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
(name 'SocketStream-dkh.16' message 'fix Issue #51, signal ConnectionClosed when zero bytes returned in SocketStreamSocket>>receiveDataSignallingTimeout:into:startingAt: - 282 run, 267 passes, 0 expected defects, 11 failures, 4 errors, 0 unexpected passes' id '4d54a9e5-1441-4e7e-b1ef-b1eafcf07fb7' date '06/27/2014' time '12:49:39' author 'dkh' ancestors ((name 'SocketStream-dkh.15' message 'improve error logging a bit and take symbol creation out of a loop' id 'd977f852-877f-43e8-9142-2887f783afa3' date '06/06/2014' time '07:53:50' author 'dkh' ancestors ((name 'SocketStream-dkh.14' message 'final touches for Zinc port: 226 run, 222 passes, 4 expected failures, 0 failures, 0 errors, 0 unexpected passes' id '59b64c1b-1da3-4c72-8271-e1f8b8d473ab' date '08/06/2012' time '17:48:24' author 'dkh' ancestors ((name 'SocketStream-dkh.13' message 'additional zinc support' id 'ec318e72-459d-4583-9465-a6b7b93cdd26' date '08/06/2012' time '12:28:12' author 'dkh' ancestors ((name 'SocketStream-PaulDeBruicker.12' message 'added a timeout for #accept. use #accept:' id 'f72cef29-376f-4345-93d2-290a478f3594' date '04/13/2011' time '11:28:17' author 'PaulDeBruicker' ancestors ((name 'SocketStream-PaulDeBruicker.11' message 'Revised so now all the tests pass. ' id 'e0ddf9f3-a526-4dfb-a77e-19ae15ba3478' date '04/12/2011' time '16:16:59' author 'PaulDeBruicker' ancestors ((name 'SocketStream-PaulDeBruicker.10' message 'Moved some extensions from Zinc to SocketStream' id '17ebfec6-9e85-45f0-b03e-b4398798b0e2' date '04/10/2011' time '11:32:48' author 'PaulDeBruicker' ancestors ((name 'SocketStream-PaulDeBruicker.9' message 'forgot to include SocketStreamSocket>>#destroy' id '5719a133-c336-4394-9eef-dd7c81910bc7' date '04/08/2011' time '18:32:46' author 'PaulDeBruicker' ancestors ((name 'SocketStream-PaulDeBruicker.8' message 'Changed to remove the testing of whether or not the socket isConnected in waitForAcceptFor:' id '6a99b6a9-6294-47e9-abd2-f6ce7e9341fa' date '04/08/2011' time '10:22:35' author 'PaulDeBruicker' ancestors ((name 'SocketStream-PaulDeBruicker.7' message 'Left a halt in inadvertently ' id 'c202e09a-80d4-4ea9-b26a-9c94fe6096e5' date '04/07/2011' time '20:04:06' author 'PaulDeBruicker' ancestors ((name 'SocketStream-PaulDeBruicker.6' message 'Had a bug where the socket waited at least until the value of standardTimeout before returning data. Things that used to take at least 45 seconds now take a fraction of a second. ' id '36f48d31-f1f1-44fd-a589-13efe4554468' date '04/07/2011' time '20:00:17' author 'PaulDeBruicker' ancestors ((name 'SocketStream-PaulDeBruicker.5' message 'initial release. Works with Chronos, passes 12 of 14 tests. Does not pass those tests which check that the appropriate error is raised when an error occurs. ' id 'fb5fc467-fbb2-4d60-8a50-22aa951cfd22' date '03/12/2011' time '00:00:00' author 'PaulDeBruicker' ancestors ((name 'SocketStream-PaulDeBruicker.4' message 'initial release. Works with Chronos, passes 12 of 14 tests. Does not pass those tests which check that the appropriate error is raised when an error occurs. ' id 'e78a7cda-b5f1-4527-be4d-c4b9fa9c2ae0' date '03/12/2011' time '00:00:00' author 'PaulDeBruicker' ancestors ((name 'SocketStream-PaulDeBruicker.3' message 'Added SocketStreamSocket>>accept' id '0e413f62-ed07-487d-bb4a-c4c7081c7674' date '03/12/2011' time '00:00:00' author 'PaulDeBruicker' ancestors ((name 'SocketStream-PaulDeBruicker.2' message 'Subclassed SpSocket rather than add a bunch of overrides and extensions' id '18cd025b-b808-4e4d-874f-d8a829c84dc7' date '03/12/2011' time '00:00:00' author 'PaulDeBruicker' ancestors ((name 'SocketStream-PaulDeBruicker.1' message 'Renamed in anticipation of uploading to Gemsource.' id '22385bc5-30f4-4c64-8e9f-8bb863e432b2' date '03/09/2011' time '00:00:00' author 'PaulDeBruicker' ancestors () stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())
1+
(name 'SocketStream-dkh.17' message 'Issue #58: fixed{?) an accept problem whereby an accept error in SocketStreamSocket would lead to an infinite loop creating processes and then running out of memory ... Fix Rest test error ... only pass exceptions in debugMode for ZnServer' id '441ec0b2-3e41-4aea-9553-0c7cebb110cb' date '12/04/2014' time '07:52:22' author 'dkh' ancestors ((name 'SocketStream-dkh.16' message 'fix Issue #51, signal ConnectionClosed when zero bytes returned in SocketStreamSocket>>receiveDataSignallingTimeout:into:startingAt: - 282 run, 267 passes, 0 expected defects, 11 failures, 4 errors, 0 unexpected passes' id '4d54a9e5-1441-4e7e-b1ef-b1eafcf07fb7' date '06/27/2014' time '12:49:39' author 'dkh' ancestors ((name 'SocketStream-dkh.15' message 'improve error logging a bit and take symbol creation out of a loop' id 'd977f852-877f-43e8-9142-2887f783afa3' date '06/06/2014' time '07:53:50' author 'dkh' ancestors ((name 'SocketStream-dkh.14' message 'final touches for Zinc port: 226 run, 222 passes, 4 expected failures, 0 failures, 0 errors, 0 unexpected passes' id '59b64c1b-1da3-4c72-8271-e1f8b8d473ab' date '08/06/2012' time '17:48:24' author 'dkh' ancestors ((name 'SocketStream-dkh.13' message 'additional zinc support' id 'ec318e72-459d-4583-9465-a6b7b93cdd26' date '08/06/2012' time '12:28:12' author 'dkh' ancestors ((name 'SocketStream-PaulDeBruicker.12' message 'added a timeout for #accept. use #accept:' id 'f72cef29-376f-4345-93d2-290a478f3594' date '04/13/2011' time '11:28:17' author 'PaulDeBruicker' ancestors ((name 'SocketStream-PaulDeBruicker.11' message 'Revised so now all the tests pass. ' id 'e0ddf9f3-a526-4dfb-a77e-19ae15ba3478' date '04/12/2011' time '16:16:59' author 'PaulDeBruicker' ancestors ((name 'SocketStream-PaulDeBruicker.10' message 'Moved some extensions from Zinc to SocketStream' id '17ebfec6-9e85-45f0-b03e-b4398798b0e2' date '04/10/2011' time '11:32:48' author 'PaulDeBruicker' ancestors ((name 'SocketStream-PaulDeBruicker.9' message 'forgot to include SocketStreamSocket>>#destroy' id '5719a133-c336-4394-9eef-dd7c81910bc7' date '04/08/2011' time '18:32:46' author 'PaulDeBruicker' ancestors ((name 'SocketStream-PaulDeBruicker.8' message 'Changed to remove the testing of whether or not the socket isConnected in waitForAcceptFor:' id '6a99b6a9-6294-47e9-abd2-f6ce7e9341fa' date '04/08/2011' time '10:22:35' author 'PaulDeBruicker' ancestors ((name 'SocketStream-PaulDeBruicker.7' message 'Left a halt in inadvertently ' id 'c202e09a-80d4-4ea9-b26a-9c94fe6096e5' date '04/07/2011' time '20:04:06' author 'PaulDeBruicker' ancestors ((name 'SocketStream-PaulDeBruicker.6' message 'Had a bug where the socket waited at least until the value of standardTimeout before returning data. Things that used to take at least 45 seconds now take a fraction of a second. ' id '36f48d31-f1f1-44fd-a589-13efe4554468' date '04/07/2011' time '20:00:17' author 'PaulDeBruicker' ancestors ((name 'SocketStream-PaulDeBruicker.5' message 'initial release. Works with Chronos, passes 12 of 14 tests. Does not pass those tests which check that the appropriate error is raised when an error occurs. ' id 'fb5fc467-fbb2-4d60-8a50-22aa951cfd22' date '03/12/2011' time '00:00:00' author 'PaulDeBruicker' ancestors ((name 'SocketStream-PaulDeBruicker.4' message 'initial release. Works with Chronos, passes 12 of 14 tests. Does not pass those tests which check that the appropriate error is raised when an error occurs. ' id 'e78a7cda-b5f1-4527-be4d-c4b9fa9c2ae0' date '03/12/2011' time '00:00:00' author 'PaulDeBruicker' ancestors ((name 'SocketStream-PaulDeBruicker.3' message 'Added SocketStreamSocket>>accept' id '0e413f62-ed07-487d-bb4a-c4c7081c7674' date '03/12/2011' time '00:00:00' author 'PaulDeBruicker' ancestors ((name 'SocketStream-PaulDeBruicker.2' message 'Subclassed SpSocket rather than add a bunch of overrides and extensions' id '18cd025b-b808-4e4d-874f-d8a829c84dc7' date '03/12/2011' time '00:00:00' author 'PaulDeBruicker' ancestors ((name 'SocketStream-PaulDeBruicker.1' message 'Renamed in anticipation of uploading to Gemsource.' id '22385bc5-30f4-4c64-8e9f-8bb863e432b2' date '03/09/2011' time '00:00:00' author 'PaulDeBruicker' ancestors () stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())

repository/Zinc-HTTP.package/ZnSingleThreadedServer.class/instance/handleError..st

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,5 @@ handleError: anException
1616
(ObjectLogEntry error: 'Zinc Server error: ' , data object: stack) addToLog ]
1717
on: Error
1818
do: [ :e | self notifyUnreportableError: anException description ].
19-
TranscriptProxy proxyTranscript ~~ nil
20-
ifTrue: [
21-
"interactive session, so bring up a debugger"
22-
anException pass ]
19+
self debugMode
20+
ifTrue: [ anException pass ]

repository/Zinc-HTTP.package/ZnSingleThreadedServer.class/methodProperties.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"authenticateRequest:do:" : "SvenVanCaekenberghe 1/10/2013 15:13",
1515
"closeDelegate" : "SvenVanCaekenberghe 1/10/2013 15:14",
1616
"executeOneRequestResponseOn:" : "dkh 11/30/2014 09:45",
17-
"handleError:" : "dkh 06/29/2014 23:12",
17+
"handleError:" : "dkh 12/04/2014 07:09",
1818
"handleRequest:" : "dkh 12/03/2014 20:04",
1919
"handleRequestProtected:" : "dkh 12/03/2014 11:59",
2020
"initializeServerSocket" : "SvenVanCaekenberghe 9/5/2012 10:11",

repository/Zinc-HTTP.package/monticello.meta/version

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

repository/Zinc-REST.package/ZnExampleSumRestCallTest.class/instance/setUp.st

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,5 @@ setUp
99
(ZnCallHierarchyRestUriSpace new
1010
rootClass: ZnExampleSumRestCall;
1111
yourself);
12-
yourself)
12+
yourself).
13+
client := self createClientFor: server localUrl

repository/Zinc-REST.package/ZnExampleSumRestCallTest.class/methodProperties.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
"class" : {
33
},
44
"instance" : {
5-
"setUp" : "dkh 12/04/2014 06:25",
5+
"setUp" : "dkh 12/04/2014 07:18",
66
"tearDown" : "dkh 12/04/2014 06:25" } }

0 commit comments

Comments
 (0)