Commit 6a6758a4 authored by Steffen Michels's avatar Steffen Michels

Merge branch 'fix-halt' into 'master'

Fix halt in TaskServer: actually close connections

See merge request !330
parents ae1b5a73 a5fe3929
Pipeline #30497 passed with stage
in 6 minutes and 23 seconds
......@@ -562,16 +562,16 @@ checkSelect i chList =:[(who,what):ws] | (i == who) = (Just what,ws)
checkSelect i chList = (Nothing,chList)
halt :: !Int !*IWorld -> *IWorld
halt exitCode iworld=:{ioTasks={todo=[],done},world}
halt exitCode iworld=:{ioTasks={todo=[]},world}
# world = setReturnCode exitCode world
= {IWorld|iworld & world = world}
halt exitCode iworld=:{ioTasks={todo=[ListenerInstance _ listener:todo],done},world}
# world = closeRChannel listener world
= halt exitCode {iworld & ioTasks = {todo=todo,done=done}}
= halt exitCode {iworld & ioTasks = {todo=todo,done=done}, world = world}
halt exitCode iworld=:{ioTasks={todo=[ConnectionInstance _ {rChannel,sChannel}:todo],done},world}
# world = closeRChannel rChannel world
# world = closeChannel sChannel world
= halt exitCode {iworld & ioTasks = {todo=todo,done=done}}
= halt exitCode {iworld & ioTasks = {todo=todo,done=done}, world = world}
ioStateString :: !IOStates -> String
ioStateString ioStates
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment