Anonymous | Login | 02-25-2021 05:58 UTC |
Main | My View | View Issues | Change Log | Docs |
Viewing Issue Simple Details [ Jump to Notes ] | [ View Advanced ] [ Issue History ] [ Print ] | |||||||||||
ID | Category | Severity | Reproducibility | Date Submitted | Last Update | |||||||
0006951 | [Squeak] Network | major | always | 02-26-08 03:32 | 02-26-08 03:32 | |||||||
Reporter | kwl | View Status | public | |||||||||
Assigned To | cdegroot | |||||||||||
Priority | low | Resolution | open | |||||||||
Status | assigned | Product Version | 3.10 | |||||||||
Summary | 0006951: #waitForData* and senders have misleading comments resp. implementation | |||||||||||
Description |
#receiveDataTimeout:into:startingAt: sends #waitForDataFor:ifClosed:ifTimedOut: with empty blocks, that is: no exception if thrown even if the request is made to a Socket which is disconnected on this side (case 1). Also, the status is reported 'otherEndClosedButNotThisEnd' (see below) as the wrong direction. Moreover, #waitForData: and #waitForDataFor:ifClosed:ifTimedOut: would signal ConnectionClosed only if the socket is closed _on_this_side_ *before* the respective message is sent (case 2). In both cases in the below, no exception is signaled at all. |
|||||||||||
Additional Information |
Case 1, no exception when this side is disconnected and #receiveData* it sent: | localhost serverSocket clientSocket worker | localhost := NetNameResolver localHostAddress. "warning" Socket allInstancesDo: [:socket | socket destroy]. serverSocket := Socket newTCP listenOn: 7680. clientSocket := Socket newTCP connectTo: localhost port: 7680. [clientSocket disconnect] on: Exception do: [:ex|]. (Delay forMilliseconds: 125) wait. worker := [clientSocket receiveDataTimeout: 1 into: (ByteArray new: 1) startingAt: 1] forkAt: Processor activeProcess priority. (Delay forMilliseconds: 125) wait. Transcript cr; show: serverSocket statusString, ' [server]'; cr; show: clientSocket statusString, ' [client], dataAvailable: ' , clientSocket dataAvailable storeString; cr; show: 'worker: ', worker browserPrintString. [clientSocket destroy] on: Exception do: [:ex|]. [serverSocket destroy] on: Exception do: [:ex|] ======> connected [server] otherEndClosedButNotThisEnd [client], dataAvailable: false worker: (40s) 3850: Process>>terminate ---------------------- Case 2: no exception when waiting for data and other side disconnects: | localhost serverSocket sessionSocket clientSocket worker | localhost := NetNameResolver localHostAddress. "warning" Socket allInstancesDo: [:socket | socket destroy]. serverSocket := Socket newTCP listenOn: 7680 backlogSize: 1. clientSocket := Socket newTCP connectNonBlockingTo: localhost port: 7680. sessionSocket := serverSocket waitForAcceptFor: 1. worker := [sessionSocket waitForDataFor: 1"; receiveSomeDataInto: (ByteArray new: 1)"] forkAt: Processor activeProcess priority. (Delay forMilliseconds: 125) wait. Transcript cr; show: serverSocket statusString, ' [server]'; cr; show: clientSocket statusString, ' [client]'; cr; show: sessionSocket statusString, ' [session], dataAvailable: ' , sessionSocket dataAvailable storeString; cr; show: 'worker: ', worker browserPrintString. [clientSocket disconnect] on: Exception do: [:ex|]. (Delay forMilliseconds: 125) wait. Transcript cr; show: serverSocket statusString, ' [server]'; cr; show: clientSocket statusString, ' [client]'; cr; show: sessionSocket statusString, ' [session], dataAvailable: ' , sessionSocket dataAvailable storeString; cr; show: 'worker: ', worker browserPrintString; cr. [sessionSocket destroy] on: Exception do: [:ex|]. [clientSocket destroy] on: Exception do: [:ex|]. [serverSocket destroy] on: Exception do: [:ex|] ======> waitingForConnection [server] connected [client] connected [session], dataAvailable: false worker: (40) 2124: Semaphore>>waitTimeoutMSecs: waitingForConnection [server] unconnected [client] connected [session], dataAvailable: true worker: (40s) 2124: Process>>terminate |
|||||||||||
Attached Files | ||||||||||||
|
There are no notes attached to this issue. |
![]() |
|||
Date Modified | Username | Field | Change |
02-26-08 03:32 | kwl | New Issue | |
02-26-08 03:32 | kwl | Status | new => assigned |
02-26-08 03:32 | kwl | Assigned To | => cdegroot |
Mantis 1.0.8[^]
Copyright © 2000 - 2007 Mantis Group
30 total queries executed. 27 unique queries executed. |