@@ -45,7 +45,7 @@ type UpArgs struct {
4545}
4646
4747type UpFlags struct {
48- Forground bool `short:"f" long:"forground " desc:"Don't Create Background Daemon."`
48+ Foreground bool `short:"f" long:"foreground " desc:"Don't Create Background Daemon."`
4949}
5050
5151func UpRun (r * cmd.Root , c * cmd.Sub ) {
@@ -65,7 +65,7 @@ func UpRun(r *cmd.Root, c *cmd.Sub) {
6565 Global , err := config .Read (configPath )
6666 checkErr (err )
6767
68- if ! flags .Forground {
68+ if ! flags .Foreground {
6969 // Make results chan
7070 out := make (chan bool )
7171 go createDaemon (out )
@@ -163,7 +163,7 @@ func createDaemon(out chan<- bool) {
163163 // Create Sub Process
164164 process , err := os .StartProcess (
165165 path ,
166- append (os .Args , "--forground " ),
166+ append (os .Args , "--foreground " ),
167167 & os.ProcAttr {
168168 Files : []* os.File {nil , w , nil },
169169 },
@@ -184,7 +184,7 @@ func createDaemon(out chan<- bool) {
184184func streamHandler (stream network.Stream ) {
185185 // If the remote node ID isn't in the list of known nodes don't respond.
186186 if _ , ok := RevLookup [stream .Conn ().RemotePeer ().Pretty ()]; ! ok {
187- stream .Close ()
187+ stream .Reset ()
188188 }
189189 io .Copy (iface .ReadWriteCloser , stream )
190190 stream .Close ()
@@ -195,7 +195,7 @@ func prettyDiscovery(ctx context.Context, node host.Host, peerTable map[string]p
195195 for ip , id := range peerTable {
196196 tempTable [ip ] = id
197197 }
198- for len (peerTable ) > 0 {
198+ for len (tempTable ) > 0 {
199199 for ip , id := range tempTable {
200200 stream , err := node .NewStream (ctx , id , p2p .Protocol )
201201 if err != nil && (strings .HasPrefix (err .Error (), "failed to dial" ) ||
0 commit comments