From c2504848e54834183212613647fbae6b6bd0a95a Mon Sep 17 00:00:00 2001 From: "hyunghwan.chung" Date: Fri, 19 Jan 2018 13:37:38 +0000 Subject: [PATCH] changed Socket.moo a little --- moo/kernel/Socket.moo | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/moo/kernel/Socket.moo b/moo/kernel/Socket.moo index 604215a..03c48e3 100644 --- a/moo/kernel/Socket.moo +++ b/moo/kernel/Socket.moo @@ -466,7 +466,8 @@ error -> exception outact := [:sck :state | if (state) { - sck writeBytes: #[ $h, $e, $l, $l, $o, C'\n' ]. + [ sck writeBytes: #[ $h, $e, $l, $l, $o, C'\n' ] ] + on: Exception do: [:ex | sck close. ]. } else { @@ -505,7 +506,7 @@ error -> exception [ s := Socket domain: Socket.Domain.INET type: Socket.Type.STREAM. s inputAction: inact; outputAction: outact. - s connectTo: (SocketAddress fromString: '192.168.1.108:9999') do: conact. + s connectTo: (SocketAddress fromString: '127.0.0.1:9999') do: conact. s2 := Socket domain: Socket.Domain.INET type: Socket.Type.STREAM. s2 inputAction: accact.