On 24/04/2007, at 13:32, Henrik Mikael Kristensen wrote:
>> This could be a bug - can you
>> verify it with a simple script that tries to write to a dead port?
This example does not seem to work. It times out properly after about
1 second and returns to the console. It should be the right way to
create a dead port?
REBOL [Title: "Port Bug"]
; This file is meant to demonstrate a port bug
; 1. Run this in console A
server: does [
listen: open/direct/no-wait tcp://:9097
wait listen
port: first listen
msg: make string! ""
forever [
wait port
append msg copy port
if find msg "die!" [
print msg
; close port ; close port first?
halt ; death notice received, halt so the port is dead
]
]
]
; 2. Run this in console B. Try multiple times.
client: does [
port: open/direct/no-wait tcp://localhost:9097
print "Inserting data"
write-io port "die!" 4
print "Done"
wait 1 ; wait for port to die
print "Inserting data again"
write-io port "something!" 10 ; this has to hang, but does not...
print "Done"
close port
]
--
Regards,
Henrik Mikael Kristensen
--
To unsubscribe from the list, just send an email to
lists at rebol.com with unsubscribe as the subject.