mirror of
https://github.com/ShadowKatStudios/OC-Minitel.git
synced 2024-11-27 04:18:05 +11:00
more timeout-related bugfixes
This commit is contained in:
parent
c3cd39544b
commit
d726ddbfb6
@ -53,6 +53,7 @@ local function cwrite(self,data)
|
|||||||
if self.state == "open" then
|
if self.state == "open" then
|
||||||
if not net.send(self.addr,self.port,data) then
|
if not net.send(self.addr,self.port,data) then
|
||||||
self:close()
|
self:close()
|
||||||
|
return false, "timed out"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -90,7 +91,7 @@ local function socket(addr,port,sclose)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function net.open(to,port)
|
function net.open(to,port)
|
||||||
net.rsend(to,port,"openstream")
|
if not net.rsend(to,port,"openstream") then return false, "no ack from host" end
|
||||||
local st = computer.uptime()+net.streamdelay
|
local st = computer.uptime()+net.streamdelay
|
||||||
local est = false
|
local est = false
|
||||||
while true do
|
while true do
|
||||||
|
Loading…
Reference in New Issue
Block a user