Skip to content

Commit 2d5a759

Browse files
committed
FIX: not possible to read url after failed lookup on posix
resolves: Oldes/Rebol-issues#2441
1 parent b836603 commit 2d5a759

File tree

2 files changed

+12
-8
lines changed

2 files changed

+12
-8
lines changed

src/os/dev-net.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ static REBOOL Nonblocking_Mode(SOCKET sock)
336336

337337
sock->error = GET_ERROR;
338338
Signal_Device(sock, EVT_ERROR);
339-
return DR_ERROR; // Remove it from pending list
339+
return DR_DONE; // Using DONE instead of ERROR -> https://github.com/Oldes/Rebol-issues/issues/2441
340340
}
341341

342342

src/tests/units/port-test.r3

+11-7
Original file line numberDiff line numberDiff line change
@@ -314,18 +314,22 @@ if system/platform = 'Windows [
314314
error? e: try [read http://www.r]
315315
e/id = 'no-connect
316316
]
317+
;@@ https://github.com/Oldes/Rebol-issues/issues/2441
318+
--assert string? try [read http://www.rebol.com]
319+
320+
===end-group===
321+
322+
323+
===start-group=== "WHOIS scheme"
324+
--test-- "read WHOIS"
325+
--assert string? probe try [read whois://google.com]
326+
--test-- "write WHOIS"
327+
--assert string? try [write whois://whois.nic.cz "seznam.cz"]
317328
===end-group===
318329

319330

320331
if "true" <> get-env "CONTINUOUS_INTEGRATION" [
321332
;- don't do these tests on Travis CI
322-
===start-group=== "WHOIS scheme"
323-
--test-- "read WHOIS"
324-
--assert string? probe try [read whois://google.com]
325-
--test-- "write WHOIS"
326-
--assert string? try [write whois://whois.nic.cz "seznam.cz"]
327-
===end-group===
328-
329333
===start-group=== "console port"
330334
--test-- "query input port"
331335
--assert port? system/ports/input

0 commit comments

Comments
 (0)