create server expression channel for only successful connections
Mentioned in #42.
This commit is contained in:
1 parent
a2cc32c908
commit
daff377f2d
1 file changed
+4
-1
@@ -54,13 +54,16 @@ func waitKey() error {
|
|||||||
func (app *App) handleInp() {
|
func (app *App) handleInp() {
|
||||||
clientChan := app.ui.readExpr(app)
|
clientChan := app.ui.readExpr(app)
|
||||||
|
|
||||||
|
var serverChan chan Expr
|
||||||
|
|
||||||
c, err := net.Dial("unix", gSocketPath)
|
c, err := net.Dial("unix", gSocketPath)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
msg := fmt.Sprintf("connecting server: %s", err)
|
msg := fmt.Sprintf("connecting server: %s", err)
|
||||||
app.ui.message = msg
|
app.ui.message = msg
|
||||||
log.Printf(msg)
|
log.Printf(msg)
|
||||||
|
} else {
|
||||||
|
serverChan = readExpr(c)
|
||||||
}
|
}
|
||||||
serverChan := readExpr(c)
|
|
||||||
|
|
||||||
for {
|
for {
|
||||||
select {
|
select {
|
||||||
|
|||||||
Reference in new issue
Block a user