added extra checks for socket accept

This commit is contained in:
hyunghwan.chung
2018-05-07 17:22:04 +00:00
parent 0a5896b16b
commit bd52dcf0bc
2 changed files with 20 additions and 5 deletions

View File

@ -493,7 +493,7 @@ class ServerSocket(Socket)
| cliaddr clisck cliact |
cliaddr := SocketAddress new.
clisck := self _accept: cliaddr.
if (clisck notError)
if (clisck notNil)
{
## the _accept method doesn't invoke the initialize method.
## i should invoke it manually here.
@ -506,7 +506,6 @@ class ServerSocket(Socket)
clisck beWatched.
}
else { clisck close }.
}.
].
}